|
2 | 2 | name: Generate Docs |
3 | 3 |
|
4 | 4 | on: |
5 | | - pull_request: |
6 | | - types: [opened, synchronize] |
7 | | - branches: |
8 | | - - main |
| 5 | + pull_request: |
| 6 | + types: [opened, synchronize] |
| 7 | + branches: |
| 8 | + - main |
9 | 9 |
|
10 | 10 | jobs: |
11 | | - generate-docs: |
12 | | - if: github.repository == 'calycode/xano-tools' && github.repository_owner == 'calycode' && startsWith(github.head_ref, 'changeset-release') |
13 | | - runs-on: ubuntu-latest |
14 | | - steps: |
15 | | - - uses: actions/checkout@v4 |
16 | | - with: |
17 | | - token: ${{ secrets.CHANGESETS_GH_TOKEN }} |
18 | | - |
19 | | - - uses: pnpm/action-setup@v4 |
20 | | - with: |
21 | | - version: 10 |
22 | | - run_install: true |
23 | | - |
24 | | - - uses: actions/setup-node@v4 |
25 | | - with: |
26 | | - node-version: 20.x |
27 | | - |
28 | | - - name: Install packages |
29 | | - run: pnpm install |
30 | | - |
31 | | - - name: Build packages |
32 | | - run: pnpm build:packages |
33 | | - |
34 | | - - name: Build Docs |
35 | | - run: pnpm build:docs |
36 | | - |
37 | | - - name: Commit and push docs |
38 | | - run: | |
39 | | - git config user.name "github-actions[bot]" |
40 | | - git config user.email "github-actions[bot]@users.noreply.github.com" |
41 | | - git fetch origin main |
42 | | - git rebase origin/main |
43 | | - git add docs |
44 | | - git commit -m "chore: update docs [skip ci]" || echo "No changes to commit" |
45 | | - git push origin HEAD:main --force-with-lease |
| 11 | + generate-docs: |
| 12 | + if: github.repository == 'calycode/xano-tools' && github.repository_owner == 'calycode' && startsWith(github.head_ref, 'changeset-release') |
| 13 | + runs-on: ubuntu-latest |
| 14 | + steps: |
| 15 | + - uses: actions/checkout@v4 |
| 16 | + with: |
| 17 | + token: ${{ secrets.CHANGESETS_GH_TOKEN }} |
| 18 | + |
| 19 | + - uses: pnpm/action-setup@v4 |
| 20 | + with: |
| 21 | + version: 10 |
| 22 | + run_install: true |
| 23 | + |
| 24 | + - uses: actions/setup-node@v4 |
| 25 | + with: |
| 26 | + node-version: 20.x |
| 27 | + |
| 28 | + - name: Install packages |
| 29 | + run: pnpm install |
| 30 | + |
| 31 | + - name: Fetch and rebase onto latest main |
| 32 | + run: | |
| 33 | + git fetch origin changeset-release/main |
| 34 | + git rebase origin/changeset-release/main |
| 35 | +
|
| 36 | + - name: Build packages |
| 37 | + run: pnpm build:packages |
| 38 | + |
| 39 | + - name: Build Docs |
| 40 | + run: pnpm build:docs |
| 41 | + |
| 42 | + - name: Commit and push docs |
| 43 | + run: | |
| 44 | + git config user.name "github-actions[bot]" |
| 45 | + git config user.email "github-actions[bot]@users.noreply.github.com" |
| 46 | + git add docs |
| 47 | + git commit -m "chore: update docs [skip ci]" || echo "No changes to commit" |
| 48 | + git push origin HEAD:main --force-with-lease |
0 commit comments