Skip to content

Commit 3c6d662

Browse files
authored
Fix GitHub Actions workflows (#2)
* Configure the git user and email address in the GitHub Pages workflow jobs * Add commit permissions to the GitHub Pages workflow jobs * List the available docs versions at the end of the GitHub Pages workflow jobs
1 parent 875504f commit 3c6d662

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

.github/workflows/main.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,17 @@ on:
1010
jobs:
1111
publish-github-pages:
1212
runs-on: ubuntu-22.04
13+
permissions:
14+
contents: write
1315
steps:
1416
- name: Clone full tree, and checkout branch
1517
uses: actions/checkout@v4
1618
with:
1719
fetch-depth: 0
20+
- name: Configure git user
21+
run: |
22+
git config --global user.name "${GITHUB_ACTOR}"
23+
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
1824
- name: Setup Python and PDM
1925
uses: pdm-project/setup-pdm@v4
2026
with:
@@ -24,3 +30,5 @@ jobs:
2430
run: pdm install
2531
- name: Publish the docs to GitHub Pages
2632
run: pdm run mike deploy --push develop
33+
- name: List available docs versions
34+
run: pdm run mike list

.github/workflows/tag.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,17 @@ jobs:
8080

8181
publish-github-pages:
8282
runs-on: ubuntu-22.04
83+
permissions:
84+
contents: write
8385
steps:
8486
- name: Clone full tree, and checkout branch
8587
uses: actions/checkout@v4
8688
with:
8789
fetch-depth: 0
90+
- name: Configure git user
91+
run: |
92+
git config --global user.name "${GITHUB_ACTOR}"
93+
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
8894
- name: Setup Python and PDM
8995
uses: pdm-project/setup-pdm@v4
9096
with:
@@ -94,3 +100,5 @@ jobs:
94100
run: pdm install
95101
- name: Publish the docs to GitHub Pages
96102
run: pdm run mike deploy --push --update-aliases ${{ github.ref_name }} latest
103+
- name: List available docs versions
104+
run: pdm run mike list

0 commit comments

Comments
 (0)