Skip to content

Commit c8c1320

Browse files
committed
update dev based on dev branch
1 parent 5a137a8 commit c8c1320

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

.github/workflows/dev.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
1+
name: Build and deploy preview
2+
13
on:
24
workflow_dispatch: # To allow for manuel trigger of this workflow. Cf
35
# https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#workflow_dispatch
4-
push:
5-
branches-ignore: # Triggers for push to all branches but main
6-
- main
76
pull_request:
87
types:
98
- opened
109
- reopened
11-
- synchronize
10+
- synchronize # When the ref of the branch is updated (= commit to the branch to merge)
1211
- closed # Including closed to remove preview when PR is closed.
1312
branches:
1413
- main # PR to main only
1514

16-
name: Preview
17-
1815
env:
1916
PREVIEW_BRANCH: gh-pages
2017

@@ -66,6 +63,7 @@ jobs:
6663
preview-branch: ${{ env.PREVIEW_BRANCH }}
6764
action: deploy
6865
comment: false
66+
pr_number: ${{ github.event.pull_request.number }}
6967

7068
- name: Comment PR (custom)
7169
uses: marocchino/sticky-pull-request-comment@v2
@@ -75,7 +73,6 @@ jobs:
7573
:rocket: View preview at <br> ${{ steps.deploy-preview.outputs.preview-url }} <br>
7674
<h6>Built to branch [`${{ env.PREVIEW_BRANCH }}`](${{ github.server_url }}/${{ github.repository }}/tree/${{ env.PREVIEW_BRANCH }}) at ${{ steps.deploy-preview.outputs.action-start-time }}. <br> Preview will be ready when the [GitHub Pages deployment](${{ github.server_url }}/${{ github.repository }}/deployments) is complete. <br> </h6>
7775
78-
7976
delete-preview:
8077
if: github.event.action == 'closed' # Only run when PR is closed
8178
runs-on: ubuntu-latest
@@ -100,3 +97,5 @@ jobs:
10097
message: |
10198
Preview removed because the pull request was closed.
10299
${{ steps.remove-preview.outputs.action-start-time }}
100+
101+

0 commit comments

Comments
 (0)