Skip to content

Commit

Permalink
use gh pages
Browse files Browse the repository at this point in the history
  • Loading branch information
tony-josi-aws committed Nov 20, 2024
1 parent c58690e commit 5427836
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/doxygen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,22 @@ jobs:
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,8 +42,6 @@ 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
run: |
Expand Down

0 comments on commit 5427836

Please sign in to comment.