Skip to content

Commit ef6e23a

Browse files
authored
Merge pull request #508 from ewels/fix-docs-release
Fix docs release
2 parents c2d7def + 10ffefe commit ef6e23a

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

.github/workflows/release-docs.yml

Lines changed: 20 additions & 4 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
@@ -21,13 +30,20 @@ jobs:
2130
- name: Install Dependencies
2231
run: pip install -r requirements.txt
2332

33+
- name: Configure git
34+
run: |
35+
git config user.name "Seqera Commmunity Team"
36+
git config user.email "[email protected]"
37+
2438
- name: Build Docs Website
25-
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
2640

2741
- name: Pin GitHub Codespaces version
2842
run: |
2943
git checkout gh-pages
30-
find ${{ github.event.release.tag_name }} -type f -exec sed -i 's|ref=master|ref=${{ github.event.release.tag_name }}|g' {} +
31-
find latest -type f -exec sed -i 's|ref=master|ref=${{ github.event.release.tag_name }}|g' {} +
32-
git commit -am "Pin GitHub Codespaces link versions"
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" {} +
46+
git add .
47+
git status
48+
git commit -m "[automated] Pin GitHub Codespaces link versions"
3349
git push

0 commit comments

Comments
 (0)