Skip to content

Commit

Permalink
GitHub workflows
Browse files Browse the repository at this point in the history
- Add workflow to check for Sphinx warnings on PR.
- Add workflow to build and deploy the documentation on GitHub pages
  • Loading branch information
ioannis-vm committed Oct 12, 2024
1 parent bf9cfb4 commit ac24de4
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/build_docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build and deploy documentation
on:
push:
branches:
- docs
jobs:
build-docs:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.10']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y pandoc
python -m pip install -e .[development]
- name: Build docs
run: cd doc && make html
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./doc/build/html
31 changes: 31 additions & 0 deletions .github/workflows/docs_check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Check for Sphinx Warnings

on:
pull_request:
paths:
- "doc/**"
- "**/*.rst"
- ".github/workflows/docs_check.yaml"
- "setup.py"

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Check out the repository
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .[development]
- name: Check for Sphinx warnings
run: |
sphinx-build -M html ./doc/source ./doc/_build --fail-on-warning

0 comments on commit ac24de4

Please sign in to comment.