Skip to content

Commit

Permalink
add new doxygen config and CI job to auto publish gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
justgook committed Aug 14, 2023
1 parent d84d456 commit 8a7d89d
Show file tree
Hide file tree
Showing 12 changed files with 516 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: publish-docs

on:
workflow_dispatch:
push:
branches:
- 'master'
- 'doxygen'
tags:
- 'v*'
env:
DOXYGEN_VERSION: 1.9.7
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install package
run: sudo apt-get install graphviz
- name: Cache Doxygen
id: cache-doxygen
uses: actions/cache@v3
with:
path: ~/doxygen-${{ env.DOXYGEN_VERSION }}
key: doxygen-${{ env.DOXYGEN_VERSION }}
- if: ${{ steps.cache-doxygen.outputs.cache-hit != 'true' }}
name: Install Doxygen
run: |
wget https://www.doxygen.nl/files/doxygen-${{ env.DOXYGEN_VERSION }}.linux.bin.tar.gz -O - | tar -xz
mv doxygen-${{ env.DOXYGEN_VERSION }} ~/doxygen-${{ env.DOXYGEN_VERSION }}
- name: Add Doxygen to Path
run : echo '~/doxygen-${{ env.DOXYGEN_VERSION }}/bin' >> $GITHUB_PATH
- name: Checkout
uses: actions/[email protected]
- name: Download css file
run: |
wget https://raw.githubusercontent.com/jothepro/doxygen-awesome-css/main/doxygen-awesome-sidebar-only.css -P deployment/resources/
wget https://raw.githubusercontent.com/jothepro/doxygen-awesome-css/main/doxygen-awesome.css -P deployment/resources/
- name: Build Github Pages
working-directory: deployment
run: doxygen Doxyfile
- name: Upload artifact
uses: actions/[email protected]
with:
path: ./deployment/html

deploy:
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/[email protected]
2 changes: 2 additions & 0 deletions deployment/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/resources/*.css
/html/
Loading

0 comments on commit 8a7d89d

Please sign in to comment.