Skip to content

Commit fdfb6d3

Browse files
committed
Fixed possible error with workflow
1 parent fc45c30 commit fdfb6d3

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

.github/workflows/main.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@ jobs:
88
name: Build Documentation
99
runs-on: ubuntu-latest
1010
if: github.event.head_commit.author.email != 'github-actions[bot]@users.noreply.github.com'
11+
permissions:
12+
contents: write
1113
steps:
1214
- name: Checkout the repo
1315
uses: actions/checkout@v4
16+
with:
17+
persist-credentials: false
1418

1519
- name: Install Tectonic
1620
run: |
@@ -21,12 +25,15 @@ jobs:
2125
run: |
2226
./tectonic "NoTeX Documentation.tex" -Z continue-on-errors --color=always
2327
24-
- name: Commit and push PDF
28+
- name: Commit PDF
2529
run: |
2630
git config --global user.name 'github-actions[bot]'
2731
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
2832
git add "NoTeX Documentation.pdf"
2933
git commit -m 'Add compiled documentation'
30-
git push
31-
env:
32-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
35+
- name: Push PDF
36+
uses: ad-m/github-push-action@master
37+
with:
38+
github_token: ${{ secrets.GITHUB_TOKEN }}
39+
branch: "main"

0 commit comments

Comments
 (0)