Skip to content

Commit 8940abd

Browse files
committed
Improve GitHub Actions documentation update workflow authentication
- Use 'x-access-token:' prefix for PAT token authentication - Consolidate clone and push steps into a single named step - Enhance security and clarity of Git authentication process
1 parent dbe7566 commit 8940abd

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

.github/workflows/update_docs.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,14 @@ jobs:
2626
cd ..
2727
sh build_html.sh
2828
- run: cd ..
29-
- run: |
30-
git clone https://${{ secrets.PAT_TOKEN }}@github.com/openmlsys/html-en.git
31-
- run: cp -r _build/html/* html-en/
32-
- run: |
29+
# Modified these steps for proper authentication
30+
- name: Clone and push to html-en
31+
run: |
32+
git clone https://x-access-token:${{ secrets.PAT_TOKEN }}@github.com/openmlsys/html-en.git
33+
cp -r _build/html/* html-en/
3334
cd html-en
3435
git config user.name "Chivier"
3536
git config user.email "[email protected]"
3637
git add .
3738
git commit -m 'update docs'
38-
git push https://${{ secrets.PAT_TOKEN }}@github.com/openmlsys/html-en.git main
39+
git push https://x-access-token:${{ secrets.PAT_TOKEN }}@github.com/openmlsys/html-en.git main

0 commit comments

Comments
 (0)