Skip to content

Publish docs to GH pages #3

Publish docs to GH pages

Publish docs to GH pages #3

Workflow file for this run

name: Build-sphinx-docs
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- 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
- name: Deploy to GitHub Pages
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
git checkout gh-pages || git checkout --orphan gh-pages
git rm -rf .
mv ./_build/html ./
git add .
git commit -m "Deploy documentation from GitHub Actions"
git push origin gh-pages