Skip to content

Commit

Permalink
Fix deploy docs action to preserve files
Browse files Browse the repository at this point in the history
  • Loading branch information
pablormier committed Apr 25, 2024
1 parent 386391d commit 64074ff
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,13 @@ jobs:
- name: Build Docs with sphinx-multiversion
run: |
poetry run sphinx-multiversion docs docs/_build/html
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
- name: Prepare Deployment
run: |
Expand All @@ -45,3 +51,4 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html
keep_files: true # Keeps existing files at deployment location

0 comments on commit 64074ff

Please sign in to comment.