Handling race conditions when caching values (#322) #50
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: sphinx-docs | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Build sphinx docs | |
run: | | |
cd docs | |
pip install --use-deprecated=legacy-resolver -r requirements.txt ../ | |
make api html | |
- name: Checkout gh-pages branch | |
uses: actions/checkout@v2 | |
with: | |
ref: gh-pages | |
path: gh-pages | |
- name: Commit documentation changes | |
run: | | |
cp -r docs/build/html/* gh-pages/ | |
cd gh-pages | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add . | |
git commit -am "Update documentation" && git push || true | |
# The above command will fail if no changes were present, so we ignore that. |