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 S |
20 | run: | |
21 | npm ci | |
22 | npm run typedoc | |
23 | ||
24 | - name: Commit files | |
12257749 | 25 | if: "github.repository == 'poolifier/poolifier' && github.ref == 'refs/heads/${{ github.event.repository.default_branch }}'" |
634be0f3 S |
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]" | |
2c23bc1e | 29 | git commit -m "Generate documentation" -a |
634be0f3 S |
30 | |
31 | - name: Push changes | |
12257749 | 32 | if: "github.repository == 'poolifier/poolifier' && github.ref == 'refs/heads/${{ github.event.repository.default_branch }}'" |
d32eb966 | 33 | uses: CasperWA/push-protected@v2 |
634be0f3 | 34 | with: |
cf5cc444 | 35 | token: ${{ secrets.GH_TOKEN_PROTECTED }} |
adc9d804 | 36 | branch: ${{ github.event.repository.default_branch }} |