mirror of
https://github.com/alexgo-io/alex-sdk.git
synced 2026-01-12 14:25:02 +08:00
feat: add github action to automatically deploy on main branch
This commit is contained in:
11
.github/workflows/docs.yaml
vendored
11
.github/workflows/docs.yaml
vendored
@@ -5,9 +5,18 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- main # or your default branch name
|
- main # or your default branch name
|
||||||
|
|
||||||
|
# Add this permissions block
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pages: write
|
||||||
|
id-token: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-deploy:
|
build-and-deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
environment:
|
||||||
|
name: github-pages
|
||||||
|
url: ${{ steps.deployment.outputs.page_url }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
@@ -27,7 +36,7 @@ jobs:
|
|||||||
run: pnpm install
|
run: pnpm install
|
||||||
|
|
||||||
- name: Build docs
|
- name: Build docs
|
||||||
run: pnpm docs
|
run: pnpm run docs
|
||||||
|
|
||||||
- name: Setup Pages
|
- name: Setup Pages
|
||||||
uses: actions/configure-pages@v4
|
uses: actions/configure-pages@v4
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ export class AlexSDK {
|
|||||||
* This function returns an array of TokenInfo objects, each containing detailed
|
* This function returns an array of TokenInfo objects, each containing detailed
|
||||||
* information about a supported swappable currency.
|
* information about a supported swappable currency.
|
||||||
*
|
*
|
||||||
* @returns {Promise<TokenInfo[]>} - A promise that resolves to an array of
|
* @returns {Promise<TokenInfo[]>} - A promise that resolves to an array of
|
||||||
* `TokenInfo` objects representing the currencies available for swaps.
|
* `TokenInfo` objects representing the currencies available for swaps.
|
||||||
*/
|
*/
|
||||||
fetchSwappableCurrency(): Promise<TokenInfo[]> {
|
fetchSwappableCurrency(): Promise<TokenInfo[]> {
|
||||||
@@ -60,7 +60,7 @@ export class AlexSDK {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function returns all possible routes for swapping between two specified currencies.
|
* This function returns all possible routes for swapping between two specified currencies.
|
||||||
* It returns an array of AMMRoute, representing possible swap routes.
|
* It returns an array of AMMRoute, representing possible swap routes.
|
||||||
*
|
*
|
||||||
* @param {Currency} from - The currency to swap from.
|
* @param {Currency} from - The currency to swap from.
|
||||||
@@ -197,8 +197,8 @@ export class AlexSDK {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function fetches the current balances of all supported tokens for a specified STX address.
|
* This function fetches the current balances of all supported tokens for a specified STX address.
|
||||||
* It returns an object where the keys are the currency identifiers (as defined in the Currency enum)
|
* It returns an object where the keys are the currency identifiers (as defined in the Currency enum)
|
||||||
* and the values are the corresponding balances as bigint values.
|
* and the values are the corresponding balances as bigint values.
|
||||||
*
|
*
|
||||||
* @param {string} stxAddress - The Stacks (STX) address to retrieve the balances for.
|
* @param {string} stxAddress - The Stacks (STX) address to retrieve the balances for.
|
||||||
|
|||||||
Reference in New Issue
Block a user