Commit | Line | Data |
---|---|---|
2c23bc1e | 1 | name: Generate documentation |
634be0f3 S |
2 | |
3 | on: | |
4 | workflow_dispatch: | |
5 | ||
6 | jobs: | |
7 | generate: | |
8 | runs-on: ubuntu-latest | |
9 | ||
10 | steps: | |
11 | - name: Checkout | |
b8497a0a | 12 | uses: actions/checkout@v3 |
634be0f3 | 13 | |
2c23bc1e | 14 | - name: Setup node |
b8497a0a | 15 | uses: actions/setup-node@v3 |
634be0f3 | 16 | with: |
02234757 | 17 | node-version: '18.x' |
634be0f3 | 18 | |
2c23bc1e | 19 | - name: Generate documentation |
634be0f3 | 20 | run: | |
186b35b6 | 21 | corepack enable |
0744f386 | 22 | corepack prepare pnpm@latest --activate |
186b35b6 JB |
23 | pnpm install |
24 | pnpm run typedoc | |
634be0f3 S |
25 | |
26 | - name: Commit files | |
12257749 | 27 | if: "github.repository == 'poolifier/poolifier' && github.ref == 'refs/heads/${{ github.event.repository.default_branch }}'" |
634be0f3 S |
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]" | |
aad19031 | 31 | git add ./docs |
72d85d71 | 32 | git commit -m "chore: generate documentation" -a |
634be0f3 S |
33 | |
34 | - name: Push changes | |
12257749 | 35 | if: "github.repository == 'poolifier/poolifier' && github.ref == 'refs/heads/${{ github.event.repository.default_branch }}'" |
d32eb966 | 36 | uses: CasperWA/push-protected@v2 |
634be0f3 | 37 | with: |
cf5cc444 | 38 | token: ${{ secrets.GH_TOKEN_PROTECTED }} |
adc9d804 | 39 | branch: ${{ github.event.repository.default_branch }} |