-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (51 loc) · 1.56 KB
/
ci.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
name: Tunage CI
on: push
# schedule:
# - cron: '0 0 * * SUN'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node.js 12.x
uses: actions/setup-node@v3
with:
node-version: 20.x
- name: Install Dependencies
run: |
npm install
npm install --global @percy/cli netlify-cli@^4
- name: Test
if: success()
run: make test-ci
continue-on-error: true
env:
CI: true
- name: Build Site
if: success()
run: make
env:
CI: true
NODE_ENV: production
- name: Visual Diff with Percy
if: success()
run: npx percy snapshot public/
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
- name: Publish on Netlify
if: success() && github.ref == 'refs/heads/master'
run: |
npx netlify deploy --prod --dir $NETLIFY_DIR --auth $NETLIFY_AUTH_TOKEN --site $NETLIFY_SITE_ID
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_DIR: public
- name: Tag Release on Sentry
if: success() && github.ref == 'refs/heads/master'
run: |
echo $(npx sentry-cli releases propose-version) > SENTRY_RELEASE_VERSION
npx sentry-cli releases new -p party --finalize $(cat SENTRY_RELEASE_VERSION)
npx sentry-cli releases set-commits --auto $(cat SENTRY_RELEASE_VERSION)
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}