Skip to content

Commit dbe7566

Browse files
committed
Streamline documentation update workflow authentication
- Use PAT token directly in Git clone and push commands - Remove redundant remote URL configuration steps - Simplify authentication mechanism for documentation updates
1 parent 8300833 commit dbe7566

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

.github/workflows/update_docs.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,13 @@ jobs:
77
build:
88
runs-on: ubuntu-20.04
99
steps:
10-
# Checkout the repository
1110
- uses: actions/checkout@v2
12-
# Set up Python 3.8
1311
- uses: actions/setup-python@v4
1412
with:
1513
python-version: '3.8'
16-
# Install Pandoc
1714
- run: |
1815
sudo apt-get update
1916
sudo apt-get install -y pandoc
20-
# Install dependencies and build docs
2117
- run: |
2218
python -m venv venv
2319
source venv/bin/activate
@@ -29,17 +25,14 @@ jobs:
2925
pip install .
3026
cd ..
3127
sh build_html.sh
32-
# Clone html-en and push updates with PAT auth
3328
- run: cd ..
3429
- run: |
35-
git clone https://github.com/openmlsys/html-en.git
30+
git clone https://${{ secrets.PAT_TOKEN }}@github.com/openmlsys/html-en.git
3631
- run: cp -r _build/html/* html-en/
3732
- run: |
3833
cd html-en
39-
# Authenticate with PAT before pushing
40-
git remote set-url origin https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/openmlsys/html-en.git
41-
git add .
4234
git config user.name "Chivier"
4335
git config user.email "[email protected]"
36+
git add .
4437
git commit -m 'update docs'
45-
git push origin main
38+
git push https://${{ secrets.PAT_TOKEN }}@github.com/openmlsys/html-en.git main

0 commit comments

Comments
 (0)