Merge pull request #112 from underworldcode/dependabot/github_actions… #62
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: API docs / jupyterbook | |
# We should trigger this from an upload event | |
on: | |
push: # We publish the beta docs as well | |
branches: | |
- master | |
- dev | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools wheel twine | |
pip install numpy | |
pip install scipy | |
pip install Cython | |
pip install jupyter-book | |
- name: Install latest stripy | |
run: | | |
pip install . | |
- name: Build docs with jupyterbook | |
shell: bash -l {0} | |
run: | | |
VERSION=`python setup.py --version` | |
echo "VERSION=$(echo $VERSION)" >> $GITHUB_ENV | |
cd jupyterbook | |
./build-book.sh | |
# Note deploy key needs the ----BEGIN ... KEY---- lines too | |
## Always deploy to version directory | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
destination_dir: ${{ env.VERSION }} | |
publish_dir: jupyterbook/_build/html | |