refactor: enforce more worker type safety
[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 corepack prepare pnpm@latest --activate
23 pnpm install
24 pnpm run typedoc
25
26 - name: Commit files
27 if: "github.repository == 'poolifier/poolifier' && github.ref == 'refs/heads/${{ github.event.repository.default_branch }}'"
28 run: |
29 git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
30 git config --local user.name "github-actions[bot]"
31 git add ./docs
32 git commit -m "chore: generate documentation" -a
33
34 - name: Push changes
35 if: "github.repository == 'poolifier/poolifier' && github.ref == 'refs/heads/${{ github.event.repository.default_branch }}'"
36 uses: CasperWA/push-protected@v2
37 with:
38 token: ${{ secrets.GH_TOKEN_PROTECTED }}
39 branch: ${{ github.event.repository.default_branch }}