-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (38 loc) · 1.22 KB
/
deploy.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
name: Deploy Via SST
on:
push:
branches: [master]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
MONGODB_URI: ${{secrets.MONGODB_URI}}
USERNAME: Paul
WEBURL: https://d11790256k2kgv.cloudfront.net
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 18
- name: Cache Next.js Build
uses: actions/cache@v3
with:
path: |
.next/cache/
.open-next/
.sst/
key: cache-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]xs') }}
restore-keys: |
cache-${{ hashFiles('**/yarn.lock.') }}-
- run: npm install -g yarn
- run: yarn install --frozen-lockfile
- run: yarn build
- name: Install AWS Creds
run: |
mkdir -p ~/.aws
echo "[default]" > ~/.aws/credentials
echo "aws_access_key_id=${{ secrets.AWS_ACCESS_KEY_ID }}" >> ~/.aws/credentials
echo "aws_secret_access_key=${{ secrets.AWS_SECRET_ACCESS_KEY }}" >> ~/.aws/credentials
- name: Deploy to AWS with SST
run: npx sst deploy --stage production