Skip to content

Commit 10ffefe

Browse files
committed
Add manual workflow_dispatch for docs release
1 parent e5959d2 commit 10ffefe

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.github/workflows/release-docs.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,22 @@ name: Publish docs [release]
33
on:
44
release:
55
types: [published]
6+
workflow_dispatch:
7+
inputs:
8+
version:
9+
type: string
10+
description: Docs version
11+
required: true
612

713
permissions:
814
contents: write
915
jobs:
1016
deploy:
1117
runs-on: ubuntu-latest
1218
steps:
19+
- name: Set version variable
20+
run: echo "VERSION=${{ github.event.release.tag_name || github.event.inputs.version }}" >> $GITHUB_ENV
21+
1322
- uses: actions/checkout@v4
1423
with:
1524
fetch-depth: 0
@@ -27,13 +36,13 @@ jobs:
2736
git config user.email "[email protected]"
2837
2938
- name: Build Docs Website
30-
run: mike deploy --alias-type copy --update-aliases ${{ github.event.release.tag_name }} latest
39+
run: mike deploy --alias-type copy --update-aliases $VERSION latest
3140

3241
- name: Pin GitHub Codespaces version
3342
run: |
3443
git checkout gh-pages
35-
find ${{ github.event.release.tag_name }} -type f -exec sed -i 's|ref=master|ref=${{ github.event.release.tag_name }}|g' {} +
36-
find latest -type f -exec sed -i 's|ref=master|ref=${{ github.event.release.tag_name }}|g' {} +
44+
find "$VERSION" -type f -exec sed -i "s|ref=master|ref=$VERSION|g" {} +
45+
find latest -type f -exec sed -i "s|ref=master|ref=$VERSION|g" {} +
3746
git add .
3847
git status
3948
git commit -m "[automated] Pin GitHub Codespaces link versions"

0 commit comments

Comments
 (0)