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: Generate Doxygen Documentation | |
on: | |
push: | |
branches: [master] | |
workflow_dispatch: | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
jobs: | |
generate-docs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Install Doxygen and Graphviz | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y doxygen graphviz | |
- name: Clone Doxygen Awesome Theme | |
run: | | |
git clone https://github.com/jothepro/doxygen-awesome-css.git doxygen-awesome | |
- name: Create and Configure Doxyfile | |
run: | | |
doxygen -g Doxyfile | |
# Customize Doxyfile settings | |
sed -i 's/^PROJECT_NAME *=.*$/PROJECT_NAME = "fbgl"/' Doxyfile | |
sed -i 's/^PROJECT_NUMBER *=.*$/PROJECT_NUMBER = 0.1.0/' Doxyfile | |
sed -i 's/^OUTPUT_DIRECTORY *=.*$/OUTPUT_DIRECTORY = docs/' Doxyfile | |
sed -i 's/^INPUT *=.*$/INPUT = fbgl.h README.md/' Doxyfile | |
sed -i 's/^HTML_OUTPUT *=.*$/HTML_OUTPUT = html/' Doxyfile | |
sed -i 's/^USE_MDFILE_AS_MAINPAGE *=.*$/USE_MDFILE_AS_MAINPAGE = README.md/' Doxyfile | |
# Configure Doxygen Awesome theme | |
echo 'HTML_EXTRA_STYLESHEET = doxygen-awesome/doxygen-awesome.css doxygen-awesome/doxygen-awesome-dark-mode.css' >> Doxyfile | |
echo 'HTML_HEADER = doxygen-awesome/doxygen-awesome-darkmode-toggle.js' >> Doxyfile | |
- name: Generate Documentation | |
run: doxygen Doxyfile | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_branch: gh-pages | |
publish_dir: docs/html | |
force_orphan: true |