Skip to content

Commit 70a3b33

Browse files
authored
fix: doxyfile workflow
1 parent a9e5a1f commit 70a3b33

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

.github/workflows/doxygen.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,37 +13,36 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
permissions:
16-
contents: write
17-
pages: write
16+
contents: write
17+
pages: write
1818

1919
steps:
2020
- name: Checkout code
2121
uses: actions/checkout@v3
2222
with:
2323
fetch-depth: 0
24+
submodules: false
2425

2526
- name: Install Doxygen
2627
run: sudo apt-get update && sudo apt-get install -y doxygen graphviz
2728

2829
- name: Generate Doxygen HTML
2930
run: doxygen ./Doxyfile
3031

31-
- name: Clone docs branch
32+
- name: Clone docs branch into docs-out/
3233
run: |
3334
git clone --branch docs https://x-access-token:${{ secrets.USER_TOKEN }}@github.com/${{ github.repository }} docs-out
3435
35-
- name: Copy generated HTML
36+
- name: Copy generated HTML into docs-out/
3637
run: |
37-
find docs-out -mindepth 1 ! -regex '^docs-out/\.git\(/.*\)?' -delete
38+
rm -rf docs-out/*
3839
cp -R docs/html/* docs-out/
3940
40-
- name: Commit & Push to `docs` branch
41+
- name: Commit and push to docs branch
4142
run: |
43+
cd docs-out
4244
git config user.name "github-actions[bot]"
4345
git config user.email "github-actions[bot]@users.noreply.github.com"
44-
git fetch origin docs || git checkout --orphan docs
45-
git switch docs || git checkout -b docs
46-
cp -r docs/html/* .
4746
git add .
4847
git commit -m "Regenerate Doxygen docs from ${{ github.sha }}" || echo "No changes to commit"
49-
git push --force https://x-access-token:${{ secrets.USER_SECRET }}@github.com/${{ github.repository }}.git HEAD:docs
48+
git push --force https://x-access-token:${{ secrets.USER_TOKEN }}@github.com/${{ github.repository }}.git HEAD:docs

0 commit comments

Comments
 (0)