Skip to content

Commit

Permalink
Add redirection to main docs in github action
Browse files Browse the repository at this point in the history
  • Loading branch information
pablormier committed Apr 25, 2024
1 parent 64074ff commit 8e16c2d
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,12 @@ jobs:
- name: Build Docs with sphinx-multiversion
run: |
if [ "${{ github.ref }}" == "refs/heads/main" ]; then
OUTDIR=docs/_build/html
else
BRANCH_NAME=$(echo ${{ github.ref }} | sed 's,refs/heads/,,; s,refs/tags/,,')
OUTDIR=docs/_build/html/${BRANCH_NAME}
fi
poetry run sphinx-multiversion docs $OUTDIR
poetry run sphinx-multiversion docs docs/_build/html
- name: Create Redirection HTML
run: |
echo '<meta http-equiv="refresh" content="0; URL='https://saezlab.github.io/corneto/main'" />' > docs/_build/html/index.html
- name: Prepare Deployment
run: |
touch ./docs/_build/html/.nojekyll
Expand All @@ -51,4 +49,4 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html
keep_files: true # Keeps existing files at deployment location
keep_files: true

0 comments on commit 8e16c2d

Please sign in to comment.