-
Notifications
You must be signed in to change notification settings - Fork 15
47 lines (36 loc) · 1.16 KB
/
deploy-serverless.yaml
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
name: Deploy Serverless AWS
on:
push:
branches: [main]
jobs:
build:
if: github.repository == 'redwoodjs/deploy-target-ci'
runs-on: ubuntu-latest
env:
REDWOOD_CI: 1
DATABASE_URL: ${{ secrets.SERVERLESS_DATABASE_URL }}
API_URL: ${{ secrets.SERVERLESS_API_URL}}
SESSION_SECRET: ${{ secrets.SERVERLESS_SESSION_SECRET}}
SERVERLESS_ACCESS_KEY: ${{ secrets.SERVERLESS_ACCESS_KEY }}
defaults:
run:
working-directory: ./serverless-aws
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install --immutable
- name: Build
run: yarn rw deploy serverless --pack-only
- name: Deploy
run: yarn rw deploy serverless