Update doxygen.yml #8
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: Update GitHub Pages Documentation | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy-docs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: List doxygen directory contents | |
run: | | |
ls -l doxygen/ | |
- name: Setup Doxygen | |
uses: mattnotmitt/doxygen-action@v1 | |
with: | |
doxyfile-path: 'doxygen/Doxyfile' | |
working-directory: 'doxygen' | |
enable-latex: false | |
- name: Configure Git for GitHub Pages deployment | |
run: | | |
git config --global user.name "GitHub Actions" | |
git config --global user.email "[email protected]" | |
- name: Deploy to GitHub Pages | |
run: | | |
git fetch | |
git checkout gh-pages || git checkout --orphan gh-pages | |
git reset --hard | |
rm -rf * # Clear old documentation | |
cp -r ${{ github.workspace }}/doxygen/html/* . | |
git add . | |
git commit -m "Update documentation" || echo "No changes to commit" | |
git push origin gh-pages --force | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |