[CI] Fix doc CI (#56)

* .

* .

* .
This commit is contained in:
Wei Fu 2025-05-29 11:09:01 +08:00 committed by GitHub
parent b240a9cf80
commit 409fa9842d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 3 deletions

View File

@ -28,7 +28,7 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v4 uses: actions/setup-python@v4
with: with:
python-version: '3.9' # Adjust version as needed python-version: '3.12' # Adjust version as needed
- name: Cache pip dependencies - name: Cache pip dependencies
uses: actions/cache@v3 uses: actions/cache@v3
@ -52,6 +52,7 @@ jobs:
- name: Deploy to GitHub Pages - name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/main' # Only deploy on main branch if: github.ref == 'refs/heads/main' # Only deploy on main branch
run: | run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.DEPLOY_TOKEN }}@github.com/${{ github.repository }}.git
ghp-import -n -p -f docs/_build/html ghp-import -n -p -f docs/_build/html
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}