forked from drift-labs/protocol-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
648 changed files
with
153,640 additions
and
7,911 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: Deploy Typescript SDK Docs | ||
|
||
on: | ||
push: | ||
branches: ["master"] | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
check-for-sdk-changes: | ||
runs-on: ubicloud | ||
# Set job outputs to values from filter step | ||
outputs: | ||
sdk: ${{ steps.filter.outputs.sdk }} | ||
steps: | ||
# For pull requests it's not necessary to checkout the code | ||
- uses: actions/checkout@v2 | ||
- uses: dorny/paths-filter@v2 | ||
id: filter | ||
with: | ||
filters: | | ||
sdk: | ||
- 'sdk/**' | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }}sdk | ||
runs-on: ubicloud | ||
needs: check-for-sdk-changes | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Generate docs | ||
run: | | ||
yarn | ||
cd sdk | ||
yarn && yarn build | ||
cd .. | ||
yarn generate-docs | ||
- name: Check for changes | ||
id: git-check | ||
run: | | ||
git diff --exit-code docs || echo "changes=true" >> $GITHUB_OUTPUT | ||
- name: Commit changes | ||
if: steps.git-check.outputs.changes == 'true' | ||
run: | | ||
git config user.name "GitHub Actions" | ||
git config user.email 41898282+github-actions[bot]@users.noreply.github.com | ||
git add docs | ||
git commit -m "Update SDK documentation" --no-verify | ||
git push origin HEAD | ||
- name: Setup Pages | ||
if: steps.git-check.outputs.changes == 'true' | ||
uses: actions/configure-pages@v5 | ||
- name: Upload artifact | ||
if: steps.git-check.outputs.changes == 'true' | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: "docs" | ||
- name: Deploy to GitHub Pages | ||
if: steps.git-check.outputs.changes == 'true' | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.