build: switch to pnpm
[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 node
15 uses: actions/setup-node@v3
16 with:
17 node-version: '18.x'
18
19 - name: Generate documentation
20 run: |
21 corepack enable
22 pnpm install
23 pnpm run typedoc
24
25 - name: Commit files
26 if: "github.repository == 'poolifier/poolifier' && github.ref == 'refs/heads/${{ github.event.repository.default_branch }}'"
27 run: |
28 git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
29 git config --local user.name "github-actions[bot]"
30 git commit -m "chore: generate documentation" -a
31
32 - name: Push changes
33 if: "github.repository == 'poolifier/poolifier' && github.ref == 'refs/heads/${{ github.event.repository.default_branch }}'"
34 uses: CasperWA/push-protected@v2
35 with:
36 token: ${{ secrets.GH_TOKEN_PROTECTED }}
37 branch: ${{ github.event.repository.default_branch }}