6e116e2f04cd2be889712b1c0768f51c8f4458e8
[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 npm ci
22 npm run typedoc
23
24 - name: Commit files
25 if: "github.repository == 'poolifier/poolifier' && github.ref == 'refs/heads/${{ github.event.repository.default_branch }}'"
26 run: |
27 git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
28 git config --local user.name "github-actions[bot]"
29 git commit -m "chore: generate documentation" -a
30
31 - name: Push changes
32 if: "github.repository == 'poolifier/poolifier' && github.ref == 'refs/heads/${{ github.event.repository.default_branch }}'"
33 uses: CasperWA/push-protected@v2
34 with:
35 token: ${{ secrets.GH_TOKEN_PROTECTED }}
36 branch: ${{ github.event.repository.default_branch }}