-
Notifications
You must be signed in to change notification settings - Fork 574
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1c835e4
commit 49a7157
Showing
2 changed files
with
10 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,8 @@ jobs: | |
convert-and-copy: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: write-all | ||
permissions: | ||
contents: write # Ensure the job has write permissions | ||
|
||
steps: | ||
- name: Checkout the Linear_Algebra_with_Python repository | ||
|
@@ -49,15 +50,17 @@ jobs: | |
sed -i '/<section class="table-of-contents">/,/<\/section>/{//!d}' book_repo/linear-algebra-with-python-book/index.html | ||
sed -i "/<section class=\"table-of-contents\">/a $toc" book_repo/linear-algebra-with-python-book/index.html | ||
- name: Remove extraheader to avoid conflicts with PAT | ||
run: git config --unset-all http.https://github.com/.extraheader | ||
|
||
- name: Commit and Push Changes | ||
- name: Set up SSH Agent | ||
uses: webfactory/[email protected] | ||
with: | ||
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
|
||
- name: Commit and Push Changes via SSH | ||
run: | | ||
cd book_repo | ||
git config user.name "GitHub Actions" | ||
git config user.email "[email protected]" | ||
git add linear-algebra-with-python-book/chapters/* | ||
git add linear-algebra-with-python-book/index.html | ||
git commit -m "Updated chapters and Table of Contents" | ||
git push origin main:master | ||
git push [email protected]:weijie-chen/weijie-chen.github.io.git main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters