adjusted version ranges #3
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
on: | |
push: | |
branches: [ main ] | |
jobs: | |
build_docs_job: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB.TOKEN }} | |
steps: | |
- name: Checkout project. | |
uses: actions/[email protected] | |
- name: Set up Python. | |
uses: actions/[email protected] | |
with: | |
python-version: '3.9' | |
- name: Install documentation dependencies. | |
run: | | |
python -m pip install "docutils<0.18 " | |
python -m pip install "numpy==1.21" | |
python -m pip install "scipy==1.9.1" | |
python -m pip install "sphinx==2.2.1" | |
python -m pip install "sphinxcontrib-bibtex==2.5.0" | |
python -m pip install "sphinx-rtd-theme==1.2.0" | |
python -m pip install "numpydoc==1.5.0" | |
sudo apt-get install -y graphviz | |
- name: Make docs. | |
run: | | |
cd docs | |
make html | |
- name: Init new repo in dist folder and commit generated files. | |
run: | | |
cd ./docs/build/html | |
git init | |
touch .nojekyll | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add -A | |
git commit -m 'built html docs' | |
- name: Force push to destination branch. | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: gh-pages | |
force: true | |
directory: ./docs/build/html | |