Merge pull request #43 from open-ephys/issue-33 #12
This file contains hidden or 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: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# 1. Generate HTML files | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10.12" | |
- name: Install pipenv | |
run: | | |
python -m pip install --upgrade pipenv wheel | |
- id: cache-pipenv | |
uses: actions/cache@v4 | |
with: | |
path: ~/.local/share/virtualenvs | |
key: ${{ runner.os }}-pipenv-${{ hashFiles('**/Pipfile.lock') }} | |
- name: Install dependencies | |
if: steps.cache-pipenv.outputs.cache-hit != 'true' | |
run: | | |
pipenv install --deploy --dev | |
- name: Build HTML pages | |
run: | | |
pipenv run make html SPHINXOPTS="-W --keep-going" | |
- name: Check all external links | |
id: make_linkcheck | |
run: | | |
pipenv run make linkcheck SPHINXOPTS="-W --keep-going" | |
- name: Upload GitHub Pages Artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: docs/html/ | |
deploy: | |
name: Deploy docs | |
runs-on: ubuntu-22.04 | |
needs: build | |
if: github.event_name == 'push' && always() && !failure() && !cancelled() | |
permissions: | |
# Both required by actions/deploy-pages | |
pages: write | |
id-token: write | |
steps: | |
- name: Deploy to GitHub Pages | |
uses: actions/deploy-pages@v4 |