-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (35 loc) · 1.1 KB
/
deployment_develop.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
name: Deployment Develop
on:
push:
branches: [ develop ]
# branches-ignore:
# - "**"
jobs:
build-and-deploy:
runs-on: ubuntu-latest
timeout-minutes: 30
environment:
name: develop
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
- name: Cache .next/cache
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
- name: NPM install
run: npm install
- name: Build and deploy
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
AWS_CLOUDFRONT_URL: ${{ secrets.AWS_CLOUDFRONT_URL }}
run: npx sst deploy --stage develop