-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (44 loc) · 1.27 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
44
45
46
47
name: Deploy Website
on:
push:
branches:
- main
permissions:
id-token: write
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- name: Checkout
uses: actions/checkout@v4
# - name: Configure AWS Credentials
# uses: aws-actions/configure-aws-credentials@v4
# with:
# role-to-assume: arn:aws:iam::730335616323:role/GitHubActionsDeploymentRole
# aws-region: us-east-1
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 8
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
- name: Install dependencies
run: pnpm i
- name: Lint
run: pnpm run lint
- name: Deep Type check
run: pnpm run type-check
- name: Build application
run: pnpm run build
# Uncomment when ready to deploy
# - name: Deploy to S3
# run: aws s3 sync --delete ./dist/ s3://${{ secrets.BUCKET_ID }}
# - name: Create CloudFront invalidation
# run: aws cloudfront create-invalidation --distribution-id ${{ secrets.DISTRIBUTION_ID }} --paths "/*"