Skip to content

Commit

Permalink
Get the branch name correct
Browse files Browse the repository at this point in the history
  • Loading branch information
lisajulia committed Jul 10, 2024
1 parent 559b048 commit 1727518
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/python_sphinx_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,15 @@ jobs:
# and take the ones tracked by git, only for the main, we take the current ones we fetched
# in steps 2 and 3 of this workflow
poetry run sphinx-versioned -m main -b "${{ github.ref }}" --force --git-root ../../
branch_name=${{ github.ref }}
if [[ "$branch_name" == refs/heads/* ]]; then
branch_name=${branch_name#refs/heads/}
fi
if [ "$branch_name" == "main" ]; then
poetry run sphinx-versioned -m main -b "main" --force --git-root ../../
else
poetry run sphinx-versioned -m main -b "main, ${branch_name}" --force --git-root ../../
fi
- name: Copy documentation to gh-pages
run: |
cp -r python/sphinx_docs/docs/_build/* python/gh-pages
Expand Down

0 comments on commit 1727518

Please sign in to comment.