Skip to content

Commit de7149e

Browse files
authored
Update main.yml
1 parent b508706 commit de7149e

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

.github/workflows/main.yml

+14-3
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ on:
77
workflow_dispatch:
88

99
permissions:
10-
id-token: write
11-
contents: read
10+
id-token: write
11+
contents: read
1212

1313
jobs:
1414
deploy:
@@ -18,6 +18,17 @@ jobs:
1818
- name: Checkout code
1919
uses: actions/checkout@v3
2020

21+
- name: Set up Node.js
22+
uses: actions/setup-node@v3
23+
with:
24+
node-version: '18' # Specify the Node.js version you need
25+
26+
- name: Install dependencies
27+
run: npm install
28+
29+
- name: Build project
30+
run: npm run build
31+
2132
- name: Configure AWS credentials using Assume Role
2233
uses: aws-actions/configure-aws-credentials@v2
2334
with:
@@ -27,7 +38,7 @@ jobs:
2738

2839
- name: Sync S3 bucket
2940
run: |
30-
aws s3 sync . ${{ secrets.PORTFOLIO_BUCKET }} --delete
41+
aws s3 sync ./dist ${{ secrets.PORTFOLIO_BUCKET }} --delete # Ensure correct path to built files
3142
3243
- name: Invalidate CloudFront cache
3344
run: |

0 commit comments

Comments
 (0)