22
22
GATSBY_DEFAULT_MAIN_URL : https://${{ secrets.PROD_CI_MAIN_URL }}
23
23
GATSBY_DRIFT_API : ${{ secrets.PROD_CI_GATSBY_DRIFT_API }}
24
24
GATSBY_GOOGLE_API_KEY : ${{ secrets.PROD_CI_GATSBY_GOOGLE_API_KEY }}
25
-
26
25
jobs :
26
+ update-dependencies :
27
+ name : Update node module dependencies
28
+ runs-on : ubuntu-latest
29
+ steps :
30
+ - name : Checkout project
31
+ uses : actions/checkout@v2
32
+ - name : Use Node.js 12.xs
33
+ uses : actions/setup-node@v1
34
+ with :
35
+ node-version : ' 12.x'
36
+ registry-url : ' https://registry.npmjs.org'
37
+ - name : Restore cache
38
+ uses : actions/cache@v2
39
+ with :
40
+ path : ' **/node_modules'
41
+ key : ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
42
+ - name : Install dependencies
43
+ run : npm install
27
44
lint :
45
+ name : Lint code and prose
28
46
runs-on : ubuntu-latest
47
+ needs :
48
+ - update-dependencies
29
49
steps :
30
50
- name : Checkout project
31
51
uses : actions/checkout@v2
@@ -46,12 +66,15 @@ jobs:
46
66
curl -sfL https://install.goreleaser.com/github.com/ValeLint/vale.sh | sh -s v2.4.0
47
67
export PATH="./bin:$PATH"
48
68
vale -v
49
- - name : Run linter
69
+ - name : Lint code
50
70
run : |
51
71
npm run lint
72
+ - name : Lint prose
73
+ run : |
52
74
export PATH="./bin:$PATH"
53
75
npm run lint:prose
54
- build :
76
+ build-deploy-prod :
77
+ name : Build and deploy to prod
55
78
runs-on : ubuntu-latest
56
79
needs :
57
80
- lint
72
95
run : npm install
73
96
- name : Build project
74
97
run : npm run build
75
- - name : Upload artifact
76
- uses : actions/upload-artifact@v2
77
- with :
78
- name : k6-docs
79
- path : public/
80
- deploy-to-production :
81
- runs-on : ubuntu-latest
82
- needs :
83
- - lint
84
- - build
85
- steps :
86
- - name : Download artifact
87
- uses : actions/download-artifact@v2
88
- with :
89
- name : k6-docs
90
- path : public/
91
98
- name : Install AWS CLI dependencies
92
99
run : sudo apt-get update && sudo apt-get -y install python-pip python-dev
93
100
- name : Install AWS CLI
0 commit comments