Skip to content

Commit

Permalink
Clarify docs_deploy GitHub logic
Browse files Browse the repository at this point in the history
1. Remove misleading PR conditional. This worfklow doesn't even run in PRs. It was bad copy-pasta from the runtime repo
2. Clarify why we point tag builds to their stable branch name
  • Loading branch information
Eric-Arellano committed Apr 4, 2024
1 parent 8a805da commit abf4871
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/docs_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@ jobs:

- name: Determine GitHub branch name
run: |
# PR workflows set the branch they're merging into.
if [ -n "$GITHUB_BASE_REF" ]; then
BRANCH_NAME="$GITHUB_BASE_REF"
# Tags like 1.0.0 and 1.0.0rc1 should point to their stable branch.
elif [[ $GITHUB_REF_NAME =~ ^([0-9]+\.[0-9]+) ]]; then
# Tags like 1.0.0 and 1.0.0rc1 should point to their stable branch. We do this
# to reduce the diff in the qiskit/documentation repository between generating
# the API docs from a tag release versus a workflow_dispatch.
if [[ $GITHUB_REF_NAME =~ ^([0-9]+\.[0-9]+) ]]; then
BRANCH_NAME="stable/${BASH_REMATCH[1]}"
else
BRANCH_NAME="$GITHUB_REF_NAME"
Expand Down

0 comments on commit abf4871

Please sign in to comment.