-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (46 loc) · 1.3 KB
/
deploy-prod.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
on:
release:
types:
- released
name: Deploy Prod to AWS
jobs:
deploy:
name: Deploy
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@master
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: "14.x"
- uses: actions/cache@v2
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: cache gatsby build
uses: actions/cache@v2
id: gatsby-cache-build
with:
path: |
web/public
web/.cache
key: ${{ runner.os }}-gatsby-build-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-gatsby-build-
- name: Install Dependencies
run: yarn
- name: Deploy
# run first deploy
# run: yarn deploy--first
run: yarn deploy:prod
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# - name: Notify result to slack
# uses: homoluctus/slatify@master
# if: always()
# with:
# type: ${{ job.status }}
# job_name: '*Deploy Lambda*'
# env:
# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}