forked from afc163/surge-preview
-
-
Notifications
You must be signed in to change notification settings - Fork 4
43 lines (42 loc) · 1.41 KB
/
preview.yml
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
35
36
37
38
39
40
41
42
43
name: 'preview'
on: # rebuild any PRs and main branch changes
pull_request:
# use default types + closed event type
types: [opened, synchronize, reopened, closed]
jobs:
preview: # make sure the action works on a clean machine without building
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./
id: preview_step
name: test shidi/cloudflare-workers-preview
with:
cf_token: ${{ secrets.CF_API_TOKEN }}
cf_account: ${{ secrets.CF_ACCOUNT_ID }}
github_token: ${{ secrets.GITHUB_TOKEN }}
domain: qvistn.workers.dev
teardown: 'true'
project_path: preview/my-site
build: |
npm install
- name: Get the output url
run: echo "url => ${{ steps.preview_step.outputs.preview_url }}"
preview2:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./
id: preview_action
name: test shidi/cloudflare-workers-preview
with:
cf_token: ${{ secrets.CF_API_TOKEN }}
cf_account: ${{ secrets.CF_ACCOUNT_ID }}
github_token: ${{ secrets.GITHUB_TOKEN }}
domain: qvistn.workers.dev
teardown: 'true'
project_path: preview/my-site
build: |
npm install
- name: Get the output url
run: echo "url => ${{ steps.preview_action.outputs.preview_url }}"