|
21 | 21 | using: composite |
22 | 22 | steps: |
23 | 23 | # 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) |
25 | 25 | - name: Deploy doc preview |
26 | | - if: ${{ github.ref_name != 'main' }} |
| 26 | + if: ${{ github.ref_name != 'main' && !startsWith(github.ref_name, 'release/') }} |
27 | 27 | uses: JamesIves/github-pages-deploy-action@6c2d9db40f9296374acc17b90404b6e8864128c8 # v4.7.3 |
28 | 28 | with: |
29 | 29 | git-config-name: cuda-python-bot |
|
33 | 33 | commit-message: "Deploy doc preview for PR ${{ inputs.pr-number }} (${{ github.sha }})" |
34 | 34 |
|
35 | 35 | - name: Leave a comment after deployment |
36 | | - if: ${{ github.ref_name != 'main' }} |
| 36 | + if: ${{ github.ref_name != 'main' && !startsWith(github.ref_name, 'release/') }} |
37 | 37 | uses: marocchino/sticky-pull-request-comment@67d0dec7b07ed060a405f9b2a64b8ab319fdd7db # v2.9.2 |
38 | 38 | with: |
39 | 39 | header: pr-preview |
|
48 | 48 | | <br> https://nvidia.github.io/cuda-python/pr-preview/pr-${{ inputs.pr-number }}/cuda-pathfinder/ <br><br> |
49 | 49 | | <h6><br> Preview will be ready when the GitHub Pages deployment is complete. <br><br></h6> |
50 | 50 |
|
51 | | - # The steps below are executed only when building on main. |
| 51 | + # The steps below are executed only when building on main or release/*. |
52 | 52 | - name: Remove doc preview |
53 | | - if: ${{ github.ref_name == 'main' }} |
| 53 | + if: ${{ github.ref_name == 'main' || startsWith(github.ref_name, 'release/') }} |
54 | 54 | uses: JamesIves/github-pages-deploy-action@6c2d9db40f9296374acc17b90404b6e8864128c8 # v4.7.3 |
55 | 55 | with: |
56 | 56 | git-config-name: cuda-python-bot |
|
60 | 60 | commit-message: "Clean up doc preview for PR ${{ inputs.pr-number }} (${{ github.sha }})" |
61 | 61 |
|
62 | 62 | - name: Leave a comment after removal |
63 | | - if: ${{ github.ref_name == 'main' }} |
| 63 | + if: ${{ github.ref_name == 'main' || startsWith(github.ref_name, 'release/') }} |
64 | 64 | uses: marocchino/sticky-pull-request-comment@67d0dec7b07ed060a405f9b2a64b8ab319fdd7db # v2.9.2 |
65 | 65 | with: |
66 | 66 | header: pr-preview |
|
0 commit comments