Skip to content

Commit b90d421

Browse files
committed
chore(workflow): update publish_docs.yml to use latest actions and fix git user setup
Update the GitHub Actions workflow to use the latest versions of actions and ensure proper Git user setup for deploying documentation. Signed-off-by: longhao <[email protected]>
1 parent b808eaa commit b90d421

File tree

1 file changed

+19
-9
lines changed

1 file changed

+19
-9
lines changed

.github/workflows/publish_docs.yml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,31 @@ jobs:
99
docs:
1010
runs-on: ubuntu-latest
1111
permissions:
12-
# IMPORTANT: this permission is mandatory for trusted publishing
13-
id-token: write
1412
contents: write
13+
id-token: write
1514
steps:
16-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
15+
- uses: actions/checkout@v4
1716
with:
1817
fetch-depth: 0
18+
1919
- name: Set up Python
2020
uses: actions/setup-python@v5
2121
with:
2222
python-version: '3.10'
23-
- run: pip install --upgrade pip && python -m pip install -U pip poetry
24-
- run: poetry --version
25-
- run: poetry install
26-
- name: Publish docs
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install poetry
28+
poetry install
29+
30+
- name: Setup Git User
31+
run: |
32+
git config --global user.name "github-actions[bot]"
33+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
34+
35+
- name: Build and Deploy Documentation
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2738
run: |
28-
gh --version
29-
poetry run mkdocs gh-deploy --remote-branch gh-pages
39+
poetry run mkdocs gh-deploy --force --remote-branch gh-pages

0 commit comments

Comments
 (0)