Skip to content

Commit

Permalink
generate docs automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
ployts authored Sep 11, 2024
1 parent 40d138d commit 54f3bbf
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/deploy_sphinx_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Deploy Sphinx documentation to Pages

on:
pull_request:
types: [opened, synchronize]
paths:
- 'docs/sphinx_doc/**/*'
push:
branches:
- main

jobs:
pages:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@master
with:
python_version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/sphinx_doc/requirements.txt
- id: build
name: Build Documentation
run: |
cd docs/sphinx_doc
bash build_sphinx_doc.sh
- name: Upload Documentation
uses: actions/upload-artifact@v3
with:
name: SphinxDoc
path: 'docs/sphinx_doc/build/html'
- uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: 'docs/sphinx_doc/build/html'

0 comments on commit 54f3bbf

Please sign in to comment.