-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (30 loc) · 1.02 KB
/
pr-preview.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: PR Preview
on:
pull_request:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: ./
name: Start preview deploy
id: start
with:
step: start
token: ${{ secrets.GITHUB_TOKEN }}
head_ref: ${{ github.head_ref }}
env: preview-${{ github.event.pull_request.number }}
env_url: https://pr-preview-${{ github.event.pull_request.number }}.example.com
- run: echo perform deploy
- uses: ./
name: Finish preview deploy
if: always()
with:
step: finish
status: ${{ job.status }}
token: ${{ secrets.GITHUB_TOKEN }}
head_ref: ${{ github.head_ref }}
env: preview-${{ github.event.pull_request.number }}
deployment_id: ${{ steps.start.outputs.deployment_id }}
env_url: https://pr-preview-${{ github.event.pull_request.number }}.example.com