diff options
| author | Levent Kaya <levent.kaya@codefirst.io> | 2024-11-28 01:08:34 +0300 |
|---|---|---|
| committer | Levent Kaya <levent.kaya@codefirst.io> | 2024-11-28 01:08:34 +0300 |
| commit | 7dfce776c8677cec06efc2d91e9391402f6bd88c (patch) | |
| tree | 72e48c0751f9d05791afee89f3a103abddda40f1 /.github | |
| parent | 8b25ef20ab3ffa29238f8b4bb2c6c0b7ec886caa (diff) | |
[ci] docs
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/docs.yml | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..5e85f11 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,56 @@ +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 Doxyfile + run: | + doxygen -g Doxyfile + + # Customize Doxyfile settings + sed -i 's/PROJECT_NAME = "My Project"/PROJECT_NAME = "fbgl"/g' Doxyfile + sed -i 's/PROJECT_NUMBER =/PROJECT_NUMBER = 0.1.0/g' Doxyfile + sed -i 's/OUTPUT_DIRECTORY =/OUTPUT_DIRECTORY = docs/g' Doxyfile + sed -i 's/INPUT =/INPUT = fbgl.h README.md/g' Doxyfile + sed -i 's/HTML_OUTPUT = html/HTML_OUTPUT = ./public/docs/html/g' Doxyfile + + # Set homepage to README.md + echo "USE_MDFILE_AS_MAINPAGE = README.md" >> Doxyfile + + # Configure Doxygen Awesome theme + echo "HTML_EXTRA_STYLESHEET = doxygen-awesome/doxygen-awesome.css" >> Doxyfile + echo "HTML_COLORSTYLE = LIGHT" >> 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: ./public/docs/html + force_orphan: true
\ No newline at end of file |
