|
4 | 4 | push: |
5 | 5 | branches: |
6 | 6 | - master |
7 | | - - develop |
| 7 | + pull_request: |
| 8 | + branches: |
| 9 | + - master |
8 | 10 |
|
9 | 11 | jobs: |
10 | 12 | build_docs_job: |
11 | 13 | runs-on: ubuntu-latest |
12 | | - env: |
13 | | - GITHUB_PAT: ${{ secrets.PUSH_TOKEN }} |
14 | 14 |
|
15 | 15 | steps: |
16 | | - - name: Checkout |
17 | | - uses: actions/checkout@v3 |
| 16 | + - name: Checkout repository |
| 17 | + uses: actions/checkout@v4 |
18 | 18 |
|
19 | | - - name: Python Set Up |
| 19 | + - name: Set up Python |
20 | 20 | uses: actions/setup-python@v4 |
21 | 21 | with: |
22 | 22 | python-version: 3.8 |
23 | 23 |
|
24 | 24 | - name: Upgrade pip |
25 | 25 | run: | |
26 | | - # install pip=>20.1 to use "pip cache dir" |
27 | | - python3 -m pip install --upgrade pip |
| 26 | + python -m pip install --upgrade pip |
28 | 27 |
|
29 | 28 | - name: Install dependencies |
30 | 29 | run: | |
31 | | - python3 -m pip install . -r requirements-dev.txt |
| 30 | + python -m pip install . -r requirements-dev.txt |
32 | 31 |
|
33 | | - - name: Make Sphinx docs |
| 32 | + - name: Build Sphinx documentation |
34 | 33 | run: | |
35 | 34 | make -C docs clean |
36 | 35 | make -C docs html |
37 | 36 |
|
38 | | - - name: Init new repository in dist folder and commit generated files |
39 | | - run: | |
40 | | - cd docs/build/html/ |
41 | | - git init |
42 | | - git remote add origin https://${{ secrets.PUSH_TOKEN }}@github.com/Xylambda/kalmankit |
43 | | - git config --global --add safe.directory /github/workspace/docs/build/html |
44 | | - touch .nojekyll |
45 | | - git add -A |
46 | | - git config --local user.email "action@github.com" |
47 | | - git config --local user.name "GitHub Action" |
48 | | - git commit -m 'deploy' |
49 | | -
|
50 | | - - name: Force push to destination branch |
51 | | - uses: ad-m/github-push-action@v0.6.0 |
| 37 | + - name: Deploy to GitHub Pages |
| 38 | + uses: peaceiris/actions-gh-pages@v4 |
52 | 39 | with: |
53 | | - github_token: ${{ secrets.PUSH_TOKEN }} |
54 | | - branch: gh-pages |
55 | | - force: true |
56 | | - directory: ./docs/build/html |
| 40 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 41 | + publish_branch: gh-pages |
| 42 | + publish_dir: docs/build/html |
0 commit comments