Skip to content

Commit 6d9dff8

Browse files
committed
Move _push_docs condition into ci
1 parent 7894539 commit 6d9dff8

File tree

3 files changed

+2
-1
lines changed

3 files changed

+2
-1
lines changed

.github/workflows/_push_docs.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ jobs:
2828
run: python .github/pages/make_switcher.py --add $DOCS_VERSION ${{ github.repository }} .github/pages/switcher.json
2929

3030
- name: Publish Docs to gh-pages
31-
if: github.ref_type == 'tag' || github.ref_name == 'main'
3231
# We pin to the SHA, not the tag, for security reasons.
3332
# https://docs.github.com/en/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions
3433
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434

3535
push_docs:
3636
needs: [test, docs]
37+
if: github.ref_type == 'tag' || github.ref_name == 'main'
3738
uses: ./.github/workflows/_push_docs.yml
3839
permissions:
3940
contents: write

template/{% if git_platform=="github.com" %}.github{% endif %}/workflows/ci.yml.jinja

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ jobs:
5757

5858
push_docs:
5959
needs: [test, docs]
60+
if: github.ref_type == 'tag' || github.ref_name == 'main'
6061
uses: ./.github/workflows/_push_docs.yml
6162
permissions:
6263
contents: write

0 commit comments

Comments
 (0)