Add Doxygen documentation and gh-pages action #1
Workflow file for this run
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: GitHub Pages | |
on: | |
push: | |
branches: | |
- 'master' | |
pull_request: | |
branches: | |
- 'master' | |
jobs: | |
docs: | |
name: "Deploy" | |
runs-on: ubuntu-latest | |
env: | |
working-directory: ./doc | |
steps: | |
- uses: actions/checkout@main | |
- name: Dependencies | |
run: | | |
sudo apt-get update && sudo apt-get install -y --no-install-recommends doxygen graphviz | |
echo "${HOME}/.local/bin" >> ${GITHUB_PATH} | |
- name: Configure Git | |
run: | | |
git config --global push.default upstream | |
git config --global user.name "GitHub Actions" | |
git config --global user.email "actions@github.com" | |
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git | |
- name: Build Doxygen | |
run: | | |
cd doxygen | |
./doc-compile.sh | |
working-directory: ${{ env.working-directory }} | |
- name: Build Mkdocs | |
run: | | |
cd mkdocs | |
./site-compile.sh | |
working-directory: ${{ env.working-directory }} | |
- name: Create and prepare gh-pages anew | |
run: | | |
git checkout --orphan gh-pages | |
rm -R `ls -A | grep -v -E "^(.git|doc)$"` | |
mv doc/mkdocs/site/* ./ | |
- name: Commit and push | |
run: | | |
git add . | |
git commit -m "Publish site" | |
git push --force --set-upstream origin gh-pages |