2222 GATSBY_DEFAULT_MAIN_URL : https://${{ secrets.PROD_CI_MAIN_URL }}
2323 GATSBY_DRIFT_API : ${{ secrets.PROD_CI_GATSBY_DRIFT_API }}
2424 GATSBY_GOOGLE_API_KEY : ${{ secrets.PROD_CI_GATSBY_GOOGLE_API_KEY }}
25-
2625jobs :
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
2744 lint :
45+ name : Lint code and prose
2846 runs-on : ubuntu-latest
47+ needs :
48+ - update-dependencies
2949 steps :
3050 - name : Checkout project
3151 uses : actions/checkout@v2
@@ -46,12 +66,15 @@ jobs:
4666 curl -sfL https://install.goreleaser.com/github.com/ValeLint/vale.sh | sh -s v2.4.0
4767 export PATH="./bin:$PATH"
4868 vale -v
49- - name : Run linter
69+ - name : Lint code
5070 run : |
5171 npm run lint
72+ - name : Lint prose
73+ run : |
5274 export PATH="./bin:$PATH"
5375 npm run lint:prose
54- build :
76+ build-deploy-prod :
77+ name : Build and deploy to prod
5578 runs-on : ubuntu-latest
5679 needs :
5780 - lint
7295 run : npm install
7396 - name : Build project
7497 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/
9198 - name : Install AWS CLI dependencies
9299 run : sudo apt-get update && sudo apt-get -y install python-pip python-dev
93100 - name : Install AWS CLI
0 commit comments