Merge branch 'master' of github.com:poolifier/poolifier
[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
JB
14 - name: Setup pnpm
15 uses: pnpm/action-setup@v2
16 with:
17 version: 8
18
8ea47589 19 - name: Setup Node.js
b8497a0a 20 uses: actions/setup-node@v3
634be0f3 21 with:
02234757 22 node-version: '18.x'
4c156521 23 cache: 'pnpm'
634be0f3 24
2c23bc1e 25 - name: Generate documentation
634be0f3 26 run: |
45415455 27 pnpm install --ignore-scripts
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 }}