Skip to content

Commit 150a918

Browse files
authored
feat: contributor-access to workflow
1 parent 9fcae9b commit 150a918

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/doxygen.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,13 @@ jobs:
3737
find docs-out -mindepth 1 ! -regex '^docs-out/\.git\(/.*\)?' -delete
3838
cp -R docs/html/* docs-out/
3939
40-
- name: Commit & Push
41-
working-directory: docs-out
40+
- name: Commit & Push to `docs` branch
4241
run: |
4342
git config user.name "github-actions[bot]"
4443
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/* .
4547
git add .
4648
git commit -m "Regenerate Doxygen docs from ${{ github.sha }}" || echo "No changes to commit"
47-
git push
49+
git push https://x-access-token:${{ secrets.USER_SECRET }}@github.com/${{ github.repository }}.git HEAD:docs

0 commit comments

Comments
 (0)