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 | |
4c156521 JB |
14 | - name: Setup pnpm |
15 | uses: pnpm/action-setup@v2 | |
16 | with: | |
17 | version: 8 | |
18 | ||
8ea47589 | 19 | - name: Setup Node.js |
b8497a0a | 20 | uses: actions/setup-node@v3 |
634be0f3 | 21 | with: |
02234757 | 22 | node-version: '18.x' |
4c156521 | 23 | cache: 'pnpm' |
634be0f3 | 24 | |
2c23bc1e | 25 | - name: Generate documentation |
634be0f3 | 26 | run: | |
186b35b6 | 27 | pnpm install |
4c156521 | 28 | pnpm typedoc |
634be0f3 S |
29 | |
30 | - name: Commit files | |
9e10031e | 31 | if: github.repository == 'poolifier/poolifier' && github.ref == 'refs/heads/${{ github.event.repository.default_branch }}' |
634be0f3 S |
32 | run: | |
33 | git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
34 | git config --local user.name "github-actions[bot]" | |
aad19031 | 35 | git add ./docs |
da0d3e5b | 36 | git commit -m "docs: generate documentation" -a |
634be0f3 S |
37 | |
38 | - name: Push changes | |
9e10031e | 39 | if: github.repository == 'poolifier/poolifier' && github.ref == 'refs/heads/${{ github.event.repository.default_branch }}' |
d32eb966 | 40 | uses: CasperWA/push-protected@v2 |
634be0f3 | 41 | with: |
cf5cc444 | 42 | token: ${{ secrets.GH_TOKEN_PROTECTED }} |
adc9d804 | 43 | branch: ${{ github.event.repository.default_branch }} |