Release Version #25
This file contains hidden or 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
| # .github/workflows/add-docs-to-release.yml | |
| name: Generate Docs | |
| on: | |
| pull_request: | |
| types: [opened, synchronize] | |
| branches: | |
| - main | |
| jobs: | |
| generate-docs: | |
| if: github.repository == 'calycode/xano-tools' && github.repository_owner == 'calycode' && startsWith(github.head_ref, 'changeset-release') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.CHANGESETS_GH_TOKEN }} | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| run_install: true | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20.x | |
| - name: Install packages | |
| run: pnpm install | |
| - name: Fetch and rebase onto latest main | |
| run: | | |
| git fetch origin main | |
| git rebase origin/main | |
| - name: Build packages | |
| run: pnpm build:packages | |
| - name: Build Docs | |
| run: pnpm build:docs | |
| - name: Commit and push docs | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add docs | |
| git commit -m "chore: update docs [skip ci]" || echo "No changes to commit" | |
| git push origin HEAD:${GITHUB_HEAD_REF} --force-with-lease |