mirror of https://github.com/Nonannet/pyhoff.git
37 lines
899 B
YAML
37 lines
899 B
YAML
name: Build and Deploy Docs
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
build-and-deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v3
|
|
with:
|
|
python-version: "3.x"
|
|
- name: Install package and dependencies
|
|
run: pip install .[doc_build]
|
|
- name: Generate Class List
|
|
run: python ./docs/source/generate_class_list.py
|
|
- name: Build Docs
|
|
run: |
|
|
cp LICENSE docs/source/LICENSE.md
|
|
cd docs
|
|
sphinx-apidoc -o ./source/ ../src/ -M --no-toc
|
|
rm ./source/*.rst
|
|
make html
|
|
touch ./build/html/.nojekyll
|
|
- name: Deploy to GitHub Pages
|
|
uses: JamesIves/github-pages-deploy-action@v4
|
|
with:
|
|
branch: gh-pages
|
|
folder: docs/build/html
|