-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (34 loc) · 1.28 KB
/
prod-deploy.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
on:
push:
branches:
- master
name: Deploy master branch to production
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v1
- name: Setup aws
uses: chrislennon/[email protected]
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Restore Serverless State
run: aws s3 sync s3://codear-nextjs-serverless-deployment-state/juryou-web/production .serverless
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Deploy
run: yarn deploy:prod
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
NEXT_PUBLIC_API_URL: ${{ secrets.NEXT_PUBLIC_API_URL }}
NEXT_PUBLIC_IDP_URL: ${{ secrets.NEXT_PUBLIC_IDP_URL }}
- name: Save Serverless State
run: aws s3 sync .serverless s3://codear-nextjs-serverless-deployment-state/juryou-web/production
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}