| 1 |
|
| 2 |
|
| 3 |
name: docs |
| 4 |
|
| 5 |
on: |
| 6 |
push: |
| 7 |
branches: |
| 8 |
- 'main' |
| 9 |
|
| 10 |
jobs: |
| 11 |
update-docs-branch: |
| 12 |
runs-on: ubuntu-22.04 |
| 13 |
permissions: |
| 14 |
contents: write |
| 15 |
steps: |
| 16 |
- name: Checkout |
| 17 |
uses: actions/checkout@v4 |
| 18 |
with: |
| 19 |
submodules: true |
| 20 |
|
| 21 |
- name: Update docs branch |
| 22 |
run: | |
| 23 |
python3 -m pip install --upgrade pip |
| 24 |
python3 -m pip install --verbose ".[dev]" |
| 25 |
./scripts/make-docs.py |
| 26 |
|
| 27 |
- name: Commit |
| 28 |
run: | |
| 29 |
git config --local user.email "[email protected]" |
| 30 |
git config --local user.name "GitHub Action" |
| 31 |
git add --force docs |
| 32 |
git commit --message="update docs" |
| 33 |
|
| 34 |
- name: Push to docs branch |
| 35 |
uses: ad-m/[email protected] |
| 36 |
with: |
| 37 |
github_token: ${{ github.token }} |
| 38 |
branch: docs |
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
force: true |