Skip to content

Build and deploy sphinx docs #130

Build and deploy sphinx docs

Build and deploy sphinx docs #130

Workflow file for this run

name: Build and deploy sphinx docs
on:
push:
branches: main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Build documentation
run: |
cd docs/
make html
- uses: actions/checkout@v4
with:
ref: "gh-pages"
repository: ${{ github.repository }}
path: "gh-pages-docs"
- name: Deploy to GitHub Pages
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
rm -rf ./gh-pages-docs/*
mv -f ${{ github.workspace }}/docs/_build/html/* ./gh-pages-docs
cd ./gh-pages-docs
touch .nojekyll
git add .
git commit -m "Deploy documentation from GitHub Actions" --allow-empty
git push origin gh-pages