Skip to content

Commit 0845fd7

Browse files
committed
fix(ci): publish docs deployment
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent 21c906e commit 0845fd7

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

‎.github/workflows/publish-docs.yml‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,15 @@ jobs:
2828
- uses: actions/checkout@v4
2929
with:
3030
fetch-depth: 0
31+
persist-credentials: false
3132
- uses: actions/setup-python@v5
3233
with:
3334
python-version: "3.x"
3435
- run: python -m pip install -r requirements-docs.txt
36+
- name: Configure Git author
37+
run: |
38+
git config user.name "github-actions[bot]"
39+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
3540
- uses: actions/create-github-app-token@v1
3641
id: pages-token
3742
with:
@@ -50,7 +55,8 @@ jobs:
5055
if git ls-remote --exit-code --heads pages gh-pages >/dev/null; then
5156
mike deploy --remote pages --branch gh-pages --push dev
5257
else
53-
mike deploy --remote pages --branch gh-pages --default dev --push dev
58+
mike deploy --remote pages --branch gh-pages --push dev
59+
mike set-default --remote pages --branch gh-pages --push dev
5460
fi
5561
- name: Publish release documentation
5662
if: startsWith(github.ref, 'refs/tags/')
@@ -61,7 +67,7 @@ jobs:
6167
echo "Unsupported documentation release tag: $VERSION" >&2
6268
exit 1
6369
fi
64-
latest=$(git tag --list | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -n 1)
70+
latest=$(git tag --list | grep -E '^[0-9]{1,3}\.[0-9]+\.[0-9]+$' | sort -V | tail -n 1)
6571
if [[ "$VERSION" == "$latest" ]]; then
6672
mike deploy --remote pages --branch gh-pages --update-aliases --push "$VERSION" latest
6773
mike set-default --remote pages --branch gh-pages --push latest

0 commit comments

Comments
 (0)