Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: regenerate docs for 1.13.2 #815

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
65 changes: 65 additions & 0 deletions .github/workflows/update-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Update Documentation

on:
release:
types: [published]

jobs:
update-docs:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Get the latest published NPM version
id: get_version
run: echo "LATEST_VERSION=$(npm show @wormhole-foundation/sdk version)" >> $GITHUB_ENV

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install the latest published SDK version
run: npm install @wormhole-foundation/sdk@$LATEST_VERSION --save-exact

- name: Update package.json version to match NPM release
run: |
jq --arg ver "$LATEST_VERSION" '.version=$ver' package.json > package.tmp.json && mv package.tmp.json package.json

- name: Install other dependencies
run: npm ci

- name: Generate documentation
run: npm run docs

- name: Commit and push changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"

git checkout -b update-docs-${{ env.LATEST_VERSION }}

echo "Checking Git Status Before Adding Files:"
git status

git restore package.json package-lock.json

echo "Checking Git Status After Reset:"
git status

git add docs/
git commit -m "Automated documentation update for SDK version $LATEST_VERSION" || exit 0

git push origin update-docs-${{ env.LATEST_VERSION }}

- name: Create a pull request using GitHub CLI
run: |
gh pr create --title "Automated Documentation Update for SDK version ${{ env.LATEST_VERSION }}" \
--body "This PR updates the documentation to match the latest SDK release: **${{ env.LATEST_VERSION }}**." \
--base main \
--head update-docs-${{ env.LATEST_VERSION }} \
--label "automated,documentation"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion docs/assets/navigation.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/assets/search.js

Large diffs are not rendered by default.

Loading