File tree Expand file tree Collapse file tree 1 file changed +61
-0
lines changed
Expand file tree Collapse file tree 1 file changed +61
-0
lines changed Original file line number Diff line number Diff line change 1+ name : validate
2+ on :
3+ push :
4+ branches : ["main"]
5+ pull_request :
6+ branches : ["main"]
7+
8+ jobs :
9+ build :
10+ name : " Build"
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : ⬇️ Checkout repo
14+ uses : actions/checkout@v2
15+
16+ - name : ⎔ Setup node
17+ uses : actions/setup-node@v1
18+ with :
19+ node_version : 14
20+
21+ - run : npm install
22+ - run : npm run lint
23+ - run : npm run check
24+ - run : npm run format
25+ - run : npm run coverage
26+ - run : npm run build -- --prod
27+
28+ - name : Upload artifacts
29+ uses : actions/upload-artifact@v2
30+ with :
31+ name : build
32+ path : |
33+ build
34+
35+ deploy :
36+ name : " Deploy"
37+ runs-on : ubuntu-latest
38+ needs : build
39+ steps :
40+ - name : ⤵️ Download build artifacts from build job
41+ uses : actions/download-artifact@v2
42+ with :
43+ name : build
44+ - uses : actions/checkout@v1
45+ - uses : netlify/actions/cli@master
46+ env :
47+ NETLIFY_AUTH_TOKEN : ${{ secrets.NETLIFY_AUTH_TOKEN }}
48+ NETLIFY_SITE_ID : ${{ secrets.NETLIFY_SITE_ID }}
49+ with :
50+ args : deploy --dir=build --prod
51+ secrets : ' ["NETLIFY_AUTH_TOKEN", "NETLIFY_SITE_ID"]'
52+
53+ codecov :
54+ name : " Coverage"
55+ runs-on : ubuntu-latest
56+ needs : deploy
57+ steps :
58+ - uses : actions/checkout@master
59+ - uses : codecov/codecov-action@v1
60+ with :
61+ token : ${{ secrets.CODECOV_TOKEN }}
You can’t perform that action at this time.
0 commit comments