Skip to content

Commit d85e12d

Browse files
committed
relax to allow release/* branches in doc_preview
1 parent 2bbfc44 commit d85e12d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/actions/doc_preview/action.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ runs:
2121
using: composite
2222
steps:
2323
# The steps below are executed only when testing in a PR.
24-
# Note: the PR previews will be removed once merged to main (see below)
24+
# Note: the PR previews will be removed once merged to main or release/* (see below)
2525
- name: Deploy doc preview
26-
if: ${{ github.ref_name != 'main' }}
26+
if: ${{ github.ref_name != 'main' && !startsWith(github.ref_name, 'release/') }}
2727
uses: JamesIves/github-pages-deploy-action@6c2d9db40f9296374acc17b90404b6e8864128c8 # v4.7.3
2828
with:
2929
git-config-name: cuda-python-bot
@@ -33,7 +33,7 @@ runs:
3333
commit-message: "Deploy doc preview for PR ${{ inputs.pr-number }} (${{ github.sha }})"
3434

3535
- name: Leave a comment after deployment
36-
if: ${{ github.ref_name != 'main' }}
36+
if: ${{ github.ref_name != 'main' && !startsWith(github.ref_name, 'release/') }}
3737
uses: marocchino/sticky-pull-request-comment@67d0dec7b07ed060a405f9b2a64b8ab319fdd7db # v2.9.2
3838
with:
3939
header: pr-preview
@@ -48,9 +48,9 @@ runs:
4848
| <br> https://nvidia.github.io/cuda-python/pr-preview/pr-${{ inputs.pr-number }}/cuda-pathfinder/ <br><br>
4949
| <h6><br> Preview will be ready when the GitHub Pages deployment is complete. <br><br></h6>
5050
51-
# The steps below are executed only when building on main.
51+
# The steps below are executed only when building on main or release/*.
5252
- name: Remove doc preview
53-
if: ${{ github.ref_name == 'main' }}
53+
if: ${{ github.ref_name == 'main' || startsWith(github.ref_name, 'release/') }}
5454
uses: JamesIves/github-pages-deploy-action@6c2d9db40f9296374acc17b90404b6e8864128c8 # v4.7.3
5555
with:
5656
git-config-name: cuda-python-bot
@@ -60,7 +60,7 @@ runs:
6060
commit-message: "Clean up doc preview for PR ${{ inputs.pr-number }} (${{ github.sha }})"
6161

6262
- name: Leave a comment after removal
63-
if: ${{ github.ref_name == 'main' }}
63+
if: ${{ github.ref_name == 'main' || startsWith(github.ref_name, 'release/') }}
6464
uses: marocchino/sticky-pull-request-comment@67d0dec7b07ed060a405f9b2a64b8ab319fdd7db # v2.9.2
6565
with:
6666
header: pr-preview

0 commit comments

Comments
 (0)