Skip to content

Commit 222bb98

Browse files
gastaldiholly-cummins
authored andcommitted
Teardown preview URLs
- Also changed the URL to avoid Chrome warnings about phishing
1 parent 23360ff commit 222bb98

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Surge.sh Preview Teardown
2+
3+
on:
4+
pull_request_target:
5+
types: [closed]
6+
7+
jobs:
8+
preview-teardown:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Teardown surge preview
12+
id: deploy
13+
run: npx surge teardown https://extensions-quarkus-pr-${{ github.event.number }}-preview.surge.sh --token ${{ secrets.SURGE_TOKEN }} || true
14+
- name: Update PR status comment
15+
uses: actions-cool/[email protected]
16+
with:
17+
token: ${{ secrets.GITHUB_TOKEN }}
18+
body: |
19+
🙈 The PR is closed and the preview is expired.
20+
<!-- Sticky Pull Request Comment -->
21+
body-include: '<!-- Sticky Pull Request Comment -->'
22+
number: ${{ github.event.number }}

.github/workflows/preview.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ jobs:
2424
rm -f pr-id.txt
2525
- name: Publishing to surge for preview
2626
id: deploy
27-
run: npx surge ./ --domain https://extensions-quarkus-io-pr-${{ steps.pr.outputs.id }}-preview.surge.sh --token ${{ secrets.SURGE_TOKEN }}
27+
run: npx surge ./ --domain https://extensions-quarkus-pr-${{ steps.pr.outputs.id }}-preview.surge.sh --token ${{ secrets.SURGE_TOKEN }}
2828
- name: Update PR status comment on success
2929
uses: actions-cool/[email protected]
3030
with:
3131
token: ${{ secrets.GITHUB_TOKEN }}
3232
body: |
33-
🚀 PR Preview ${{ github.sha }} has been successfully built and deployed to https://extensions-quarkus-io-pr-${{ steps.pr.outputs.id }}-preview.surge.sh
33+
🚀 PR Preview ${{ github.sha }} has been successfully built and deployed to https://extensions-quarkus-pr-${{ steps.pr.outputs.id }}-preview.surge.sh
3434
<!-- Sticky Pull Request Comment -->
3535
body-include: '<!-- Sticky Pull Request Comment -->'
3636
number: ${{ steps.pr.outputs.id }}

0 commit comments

Comments
 (0)