change workflow to clean branch #178
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 # Set a branch to deploy | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Clean gh-pages branch | |
run: | | |
git push origin --delete gh-pages | |
git checkout --orphan gh-pages | |
git rm -rf --dry-run . | |
git rm -rf . | |
git push gh-pages | |
- name: Generate Doxygen | |
run: | | |
sudo apt-get install doxygen graphviz | |
cd documentation | |
rm -rf html | |
doxygen Doxyfile | |
cd .. | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./documentation/html | |
clean: true | |