File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -3,13 +3,22 @@ name: Publish docs [release]
33on :
44 release :
55 types : [published]
6+ workflow_dispatch :
7+ inputs :
8+ version :
9+ type : string
10+ description : Docs version
11+ required : true
612
713permissions :
814 contents : write
915jobs :
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"
You can’t perform that action at this time.
0 commit comments