Skip to content

change sphinx version to support sphinx-book-theme #6

change sphinx version to support sphinx-book-theme

change sphinx version to support sphinx-book-theme #6

Workflow file for this run

name: Build and publish documentation
on:
push:
branches:
- main
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Set up Pandoc
uses: r-lib/actions/setup-pandoc@v2
- name: Checkout source
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install filterjax and all its dependencies
run: |
conda install pip
pip install .
pip install .[dev]
- name: Checkout gh-pages
uses: actions/checkout@v2
with:
ref: gh-pages
path: docs/_build/html
- name: Build docs
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags')
run: |
sphinx-build docs docs/_build/html
touch docs/_build/html/.nojekyll
- name: Publish docs to gh-pages
# Only once from main or a tag
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags')
# We pin to the SHA, not the tag, for security reasons.
# https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions
uses: peaceiris/actions-gh-pages@bbdfb200618d235585ad98e965f4aafc39b4c501 # v3.7.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/html
keep_files: true