Skip to content

Fix doxygen

Fix doxygen #238

Workflow file for this run

name: Doxygen
on:
push:
branches: ['main']
pull_request:
branches: ['main']
types: [opened, closed]
jobs:
update-doxygen:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
- name: Switch to gh-pages branch
shell: bash
run: |
# Check if the gh-pages branch exists. If not, create it.
branch_exist=$(git ls-remote --heads origin gh-pages)
if [ -z ${branch_exist} ]; then
git config --global user.name ${{ github.actor }}
git config --global user.email ${{ github.actor }}@users.noreply.github.com
git checkout --orphan gh-pages
git reset --hard
git commit --allow-empty -m "Created gh-pages branch"
git push origin gh-pages
fi
# Switch to gh-pages branch
git fetch
git checkout gh-pages
- name: Create local changes
run: |
sudo apt-get install doxygen
cd docs
doxygen
cp -r ./html/* ./
rm -rf ./html
git add .
- name: Commit files
run: |
git commit -m "Auto-generate Doxygen documentation via Github Actions" -a
- name: Push changes
run: |
git push origin gh-pages