-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (61 loc) · 1.81 KB
/
node-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
56
57
58
59
60
61
name: Node.js CI
'on':
push:
branches:
- master
- renovate/**
pull_request:
types:
- opened
- synchronize
env:
FORCE_COLOR: 1
NPM_CONFIG_COLOR: always
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
with:
fetch-depth: 0
- name: Import Public PGP Key
run: curl https://keybase.io/travi/key.asc | gpg --import
- name: Setup node
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3
with:
node-version-file: .nvmrc
cache: npm
- run: npm clean-install
- run: npm audit signatures
- run: npm test
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
# - name: report webpack stats
# run: npm run packtracker:publish
# env:
# PT_PROJECT_TOKEN: ${{ secrets.PT_PROJECT_TOKEN }}
# PT_BRANCH: ${{ steps.extract_branch.outputs.branch }}
deploy:
if: github.ref == 'refs/heads/master'
needs: verify
runs-on: ubuntu-latest
environment: Production
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- name: Setup node
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3
with:
node-version-file: .nvmrc
cache: npm
- run: npm clean-install
- run: npm audit signatures
- run: npm run deploy:netlify -- --prod
env:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
permissions:
contents: read