doc: Added doxygen support #36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: documentation | |
on: [push, pull_request, workflow_dispatch] | |
permissions: | |
contents: write | |
jobs: | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v3 | |
- name: Install dependencies | |
run: | | |
python -m pip install sphinx-toolbox | |
pip install sphinx sphinx_rtd_theme myst_parser | |
sudo apt-get install doxygen graphviz -y | |
- name: Sphinx build | |
run: | | |
sphinx-build doc/sphinx _build | |
- name: Doxygen build | |
run: | | |
doxygen doc/doxygen/Doxyfile | |
git fetch --depth 1 origin +refs/heads/gh-pages:gh-pages | |
git checkout gh-pages | |
mkdir -p doxygen | |
git add --all . | |
git commit --allow-empty --amend -m "Update documentation to ${MASTER_COMMIT:0:7}" | |
git push https://${secrets.GITHUB_TOKEN}@github.com/${REPO_SLUG} gh-pages -f | |
- name: Deploy doxygen to GitHub Pages | |
uses: DenverCoder1/[email protected] | |
with: | |
branch: gh-pages | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
folder: doxygen | |
config_file: doc/doxygen/Doxyfile | |
- name: Deploy sphinx to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
publish_branch: gh-pages | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: _build/ | |
force_orphan: true |