-
Notifications
You must be signed in to change notification settings - Fork 19
61 lines (58 loc) · 1.73 KB
/
pull-requests.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: QA and deploy to preview environment
on: pull_request
jobs:
qa:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "16"
- name: Install
run: yarn install --immutable --immutable-cache --check-cache
- name: Check formatting
run: yarn check-formatting
- name: Lint
run: yarn lint
- name: Build
run: yarn build
- name: Test
run: yarn test
- name: Save scenario test results
if: always()
uses: actions/upload-artifact@v2
with:
name: scenario-test-results
if-no-files-found: ignore
path: |
**/test-results/**/*
!**/node_modules/**/*
deploy:
needs: qa
runs-on: ubuntu-latest
environment: StaticDeployPreview
env:
STATICDEPLOY_API_URL: ${{secrets.STATICDEPLOY_API_URL}}
STATICDEPLOY_API_TOKEN: ${{secrets.STATICDEPLOY_API_TOKEN}}
CLOUDFLARE_ZONE_ID: ${{secrets.CLOUDFLARE_ZONE_ID}}
CLOUDFLARE_API_TOKEN: ${{secrets.CLOUDFLARE_API_TOKEN}}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "16"
- name: Install
run: yarn install
- name: Build
run: yarn build
- name: Deploy bundle
run: yarn deploy:bundle
- name: Deploy preview entrypoint
run: yarn deploy:entrypoint:preview
- name: Purge CDN cache
run: yarn deploy:purge
- uses: mshick/add-pr-comment@v1
with:
message: |
Preview available at https://preview.excalideck.com/PR/${{ github.event.number }}/
repo-token: ${{ secrets.GITHUB_TOKEN }}