11265f09c1f8b079f50d9585df143a582978a287
[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 commit -m "chore: generate documentation" -a
32
33 - name: Push changes
34 if: "github.repository == 'poolifier/poolifier' && github.ref == 'refs/heads/${{ github.event.repository.default_branch }}'"
35 uses: CasperWA/push-protected@v2
36 with:
37 token: ${{ secrets.GH_TOKEN_PROTECTED }}
38 branch: ${{ github.event.repository.default_branch }}