Fix MyBinder with Docker #14
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: Build Documentation | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
build-doc: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup headless display | |
uses: pyvista/setup-headless-display-action@v1 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Intall dependencies | |
run: | | |
pip install -r requirements.txt | |
pip install -r docs/requirements.txt | |
- name: Build Documentation | |
working-directory: docs | |
run: make html | |
- name: Stash build | |
uses: actions/upload-artifact@v2 | |
with: | |
name: docs-build | |
path: docs/_build/html | |
deploy: | |
name: Publish Documentation | |
runs-on: ubuntu-latest | |
needs: build-doc | |
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/download-artifact@v2 | |
with: | |
name: docs-build | |
path: docs/_build/html | |
- name: Deploy to GH Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: docs/_build/html |