forked from wednesday-solutions/appsync-rds-todo
-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (30 loc) · 1 KB
/
cd.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
name: appsync-rds-todo CD develop
on:
push:
branches:
- develop
jobs:
primary:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: 12.x
- name: install dependencies
run: npm i
- name: Get branch name
id: vars
run: echo ::set-output name=stage::${GITHUB_REF#refs/*/}
- name: Create envfile
uses: SpicyPizza/create-envfile@v1
with:
envkey_DB_PASSWORD: ${{ secrets.DB_PASSWORD_DEV }}
envkey_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
file_name: .env.${{steps.vars.outputs.stage}}.local
- name: serverless deploy --stage=${{steps.vars.outputs.stage}}
run: npx serverless deploy --stage=${{steps.vars.outputs.stage}} --force
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}