-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (36 loc) · 1.13 KB
/
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
35
36
37
38
39
40
41
42
43
name: Deploy
on:
push:
branches: [main]
permissions:
actions: read
checks: read
contents: read
deployments: read
issues: read
pull-requests: read
statuses: read
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
id: setup-node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "yarn"
- name: Install dependencies
run: yarn install --immutable --immutable-cache
- uses: actions/cache@v4
with:
path: ${{ github.workspace }}/.next/cache
key: v1-${{ runner.os }}-${{ steps.setup-node.outputs.node-version }}-nextjs-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx', '**/*.md', '**/*.css') }}
restore-keys: |
v1-${{ runner.os }}-${{ steps.setup-node.outputs.node-version }}-nextjs-${{ hashFiles('**/yarn.lock') }}-
- name: Deploy
run: yarn deploy
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}