Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix doxygen #479

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 19 additions & 8 deletions .github/workflows/doxygen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,26 @@ jobs:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true
steps:
- uses: actions/checkout@v2
- 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
Expand All @@ -26,12 +42,7 @@ jobs:
git add .
- name: Commit files
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -m "Auto-generate Doxygen documentation via Github Actions" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
force: true
run: |
git push origin gh-pages
Loading