Commit | Line | Data |
---|---|---|
634be0f3 S |
1 | name: Generate TypeDoc |
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@v2 | |
13 | with: | |
14 | persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token | |
15 | fetch-depth: 0 # otherwise, you will failed to push refs to dest repo | |
16 | ||
17 | - name: Set node version to 14 | |
18 | uses: actions/setup-node@v2 | |
19 | with: | |
20 | node-version: 14 | |
21 | ||
22 | - name: Generate TypeDoc | |
23 | run: | | |
24 | npm ci | |
25 | npm run typedoc | |
26 | ||
27 | - name: Commit files | |
28 | if: "github.repository == 'pioardi/poolifier' && github.ref == 'refs/heads/master'" | |
29 | run: | | |
30 | git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
31 | git config --local user.name "github-actions[bot]" | |
32 | git commit -m "Generate TypeDoc" -a | |
33 | ||
34 | - name: Push changes | |
35 | if: "github.repository == 'pioardi/poolifier' && github.ref == 'refs/heads/master'" | |
36 | uses: ad-m/github-push-action@master | |
37 | with: | |
38 | github_token: ${{ secrets.GITHUB_TOKEN }} | |
39 | branch: master |