build(deps-dev): bump @types/node
[poolifier.git] / .github / workflows / generate-documentation.yml
1 name: Generate documentation
2
3 on:
4 workflow_dispatch:
5
6 jobs:
7 generate:
8 runs-on: ubuntu-latest
9
10 steps:
11 - name: Checkout
12 uses: actions/checkout@v3
13
14 - name: Setup pnpm
15 uses: pnpm/action-setup@v2
16 with:
17 version: 8
18
19 - name: Setup Node.js
20 uses: actions/setup-node@v3
21 with:
22 node-version: '18.x'
23 cache: 'pnpm'
24
25 - name: Generate documentation
26 run: |
27 pnpm install
28 pnpm typedoc
29
30 - name: Commit files
31 if: github.repository == 'poolifier/poolifier' && github.ref == 'refs/heads/${{ github.event.repository.default_branch }}'
32 run: |
33 git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
34 git config --local user.name "github-actions[bot]"
35 git add ./docs
36 git commit -m "docs: generate documentation" -a
37
38 - name: Push changes
39 if: github.repository == 'poolifier/poolifier' && github.ref == 'refs/heads/${{ github.event.repository.default_branch }}'
40 uses: CasperWA/push-protected@v2
41 with:
42 token: ${{ secrets.GH_TOKEN_PROTECTED }}
43 branch: ${{ github.event.repository.default_branch }}