Skip to content

Commit

Permalink
Only update docs on release
Browse files Browse the repository at this point in the history
  • Loading branch information
danielward27 committed Aug 14, 2023
1 parent bbaf4b7 commit dc7ffc6
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 38 deletions.
38 changes: 0 additions & 38 deletions .github/workflows/documentation.yml

This file was deleted.

33 changes: 33 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,37 @@ jobs:
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}

docs:
name: Build and publish documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Install pandoc
run: |
sudo apt-get update
sudo apt-get install -y pandoc
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install -r docs/requirements.txt
- name: Test documentation
run: |
make -C docs doctest
- name: Sphinx build
run: |
sphinx-build docs docs/_build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/
force_orphan: true

0 comments on commit dc7ffc6

Please sign in to comment.