Skip to content

Fix docs release #508

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions .github/workflows/release-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,22 @@ name: Publish docs [release]
on:
release:
types: [published]
workflow_dispatch:
inputs:
version:
type: string
description: Docs version
required: true

permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Set version variable
run: echo "VERSION=${{ github.event.release.tag_name || github.event.inputs.version }}" >> $GITHUB_ENV

- uses: actions/checkout@v4
with:
fetch-depth: 0
Expand All @@ -21,13 +30,20 @@ jobs:
- name: Install Dependencies
run: pip install -r requirements.txt

- name: Configure git
run: |
git config user.name "Seqera Commmunity Team"
git config user.email "community@seqera.io"

- name: Build Docs Website
run: mike deploy --alias-type copy --update-aliases ${{ github.event.release.tag_name }} latest
run: mike deploy --alias-type copy --update-aliases $VERSION latest

- name: Pin GitHub Codespaces version
run: |
git checkout gh-pages
find ${{ github.event.release.tag_name }} -type f -exec sed -i 's|ref=master|ref=${{ github.event.release.tag_name }}|g' {} +
find latest -type f -exec sed -i 's|ref=master|ref=${{ github.event.release.tag_name }}|g' {} +
git commit -am "Pin GitHub Codespaces link versions"
find "$VERSION" -type f -exec sed -i "s|ref=master|ref=$VERSION|g" {} +
find latest -type f -exec sed -i "s|ref=master|ref=$VERSION|g" {} +
git add .
git status
git commit -m "[automated] Pin GitHub Codespaces link versions"
git push