-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
1 changed file
with
3 additions
and
10 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 |
---|---|---|
|
@@ -7,17 +7,13 @@ jobs: | |
build: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
# Checkout the repository | ||
- uses: actions/checkout@v2 | ||
# Set up Python 3.8 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.8' | ||
# Install Pandoc | ||
- run: | | ||
sudo apt-get update | ||
sudo apt-get install -y pandoc | ||
# Install dependencies and build docs | ||
- run: | | ||
python -m venv venv | ||
source venv/bin/activate | ||
|
@@ -29,17 +25,14 @@ jobs: | |
pip install . | ||
cd .. | ||
sh build_html.sh | ||
# Clone html-en and push updates with PAT auth | ||
- run: cd .. | ||
- run: | | ||
git clone https://github.com/openmlsys/html-en.git | ||
git clone https://${{ secrets.PAT_TOKEN }}@github.com/openmlsys/html-en.git | ||
- run: cp -r _build/html/* html-en/ | ||
- run: | | ||
cd html-en | ||
# Authenticate with PAT before pushing | ||
git remote set-url origin https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/openmlsys/html-en.git | ||
git add . | ||
git config user.name "Chivier" | ||
git config user.email "[email protected]" | ||
git add . | ||
git commit -m 'update docs' | ||
git push origin main | ||
git push https://${{ secrets.PAT_TOKEN }}@github.com/openmlsys/html-en.git main |