Skip to content

Commit 116dea6

Browse files
committed
Fix GitHub Codespaces links to release tag after build with mike
1 parent 44b6fd7 commit 116dea6

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/release-docs.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,25 @@ jobs:
1010
deploy:
1111
runs-on: ubuntu-latest
1212
steps:
13+
1314
- uses: actions/checkout@v4
1415
with:
1516
fetch-depth: 0
17+
1618
- uses: actions/setup-python@v5
1719
with:
1820
python-version: 3.10.6
21+
1922
- name: Install Dependencies
2023
run: pip install -r requirements.txt
24+
2125
- name: Build Docs Website
22-
run: mike deploy --push --alias-type copy --update-aliases ${{ github.event.release.tag_name }} latest
26+
run: mike deploy --alias-type copy --update-aliases ${{ github.event.release.tag_name }} latest
27+
28+
- name: Pin GitHub Codespaces version
29+
run: |
30+
git checkout gh-pages
31+
find ${{ github.event.release.tag_name }} -type f -exec sed -i 's|ref=master|ref=${{ github.event.release.tag_name }}|g' {} +
32+
find latest -type f -exec sed -i 's|ref=master|ref=${{ github.event.release.tag_name }}|g' {} +
33+
git commit -am "Pin GitHub Codespaces link versions"
34+
git push

0 commit comments

Comments
 (0)