chore: switch to pnpm 9.x.x
[poolifier.git] / .github / workflows / generate-documentation.yml
CommitLineData
2c23bc1e 1name: Generate documentation
634be0f3
S
2
3on:
4 workflow_dispatch:
5
6jobs:
7 generate:
8 runs-on: ubuntu-latest
9
10 steps:
11 - name: Checkout
b358d1ac 12 uses: actions/checkout@v4
634be0f3 13
4c156521 14 - name: Setup pnpm
2ca706c4 15 uses: pnpm/action-setup@v3
4c156521 16 with:
3d5424d5 17 version: 9
4c156521 18
8ea47589 19 - name: Setup Node.js
6c527d3f 20 uses: actions/setup-node@v4
634be0f3 21 with:
3d5424d5 22 node-version: 20.x
4c156521 23 cache: 'pnpm'
634be0f3 24
2c23bc1e 25 - name: Generate documentation
634be0f3 26 run: |
c1a37d98 27 pnpm install --ignore-scripts --frozen-lockfile
4c156521 28 pnpm typedoc
634be0f3
S
29
30 - name: Commit files
9e10031e 31 if: github.repository == 'poolifier/poolifier' && github.ref == 'refs/heads/${{ github.event.repository.default_branch }}'
27c3ac59
JB
32 env:
33 COMMIT_MESSAGE: 'docs: generate documentation'
34 COMMIT_AUTHOR: Documentation Bot
35 COMMIT_EMAIL: documentation-bot@users.noreply.github.com
634be0f3 36 run: |
27c3ac59
JB
37 git config --local user.name "${{ env.COMMIT_AUTHOR }}"
38 git config --local user.email "${{ env.COMMIT_EMAIL }}"
f0067563 39 git pull
aad19031 40 git add ./docs
27c3ac59 41 git commit -a -m "${{ env.COMMIT_MESSAGE }}"
634be0f3
S
42
43 - name: Push changes
9e10031e 44 if: github.repository == 'poolifier/poolifier' && github.ref == 'refs/heads/${{ github.event.repository.default_branch }}'
d32eb966 45 uses: CasperWA/push-protected@v2
634be0f3 46 with:
cf5cc444 47 token: ${{ secrets.GH_TOKEN_PROTECTED }}
adc9d804 48 branch: ${{ github.event.repository.default_branch }}