Skip to content

Build documentation for GitHub Pages #3

Build documentation for GitHub Pages

Build documentation for GitHub Pages #3

Workflow file for this run

name: Build documentation for GitHub Pages
on:
push:
branches:
- main
workflow_dispatch: # Enable manual action trigger
jobs:
build_documentation_for_github_pages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: '3.8'
cache: 'pip' # caching pip dependencies
- run: pip install sphinx sphinx-rtd-theme
- run: python3 -m sphinx ./doc docs
- name: publish doc
shell: bash
run: |
git config user.name "GitHub Action"
git config user.email "no@mail.tmp"
git add -f docs/
git commit -m "Doc build"
git push origin `git subtree split --prefix docs/ main`:gh-pages --force