diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index ed63811d..e8979dec 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -12,7 +12,7 @@ defaults: shell: bash -le {0} jobs: build-sphinx-html: - if: (((github.repository == 'tardis-sn/stardis') && (${{ github.head_ref || github.ref_name}} == 'main')) || (github.repository_owner != 'tardis-sn')) && contains(github.event.pull_request.labels.*.name, 'build-docs') + if: ((github.repository == 'tardis-sn/stardis') && (${{ github.head_ref || github.ref_name}} == 'main') && contains(github.event.pull_request.labels.*.name, 'build-docs')) || (github.repository_owner != 'tardis-sn') # The above line makes this action run if it is either not on the upstream/main or the main branch of upstream/main. # If there is a better way to implement this, I'd like someone to please share. # The context to get the branch name is from https://stackoverflow.com/a/71158878