Skip to content

Commit bc3ac3a

Browse files
committed
Test deployment
1 parent 147aa2c commit bc3ac3a

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/deployment.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Deployment
2+
3+
on:
4+
push:
5+
branches:
6+
- deployment
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v3
14+
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v3
17+
with:
18+
node-version: 18
19+
20+
- name: Enable Corepack
21+
run: corepack enable
22+
23+
- name: Setup Yarn
24+
run: corepack prepare [email protected] --activate
25+
26+
- name: Install dependencies
27+
run: yarn install
28+
29+
- name: Build
30+
run: yarn build
31+
32+
- name: Configure AWS credentials
33+
uses: aws-actions/configure-aws-credentials@v2
34+
with:
35+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
36+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
37+
aws-region: ${{ secrets.AWS_REGION }}
38+
39+
- name: Log region and bucket name
40+
run: |
41+
echo "Region: ${{ secrets.AWS_REGION }}"
42+
echo "Bucket Name: ${{ secrets.AWS_S3_BUCKET_NAME }}"
43+
44+
- name: Deploy to S3
45+
run: |
46+
aws s3 sync build s3://${{ secrets.AWS_S3_BUCKET_NAME }}/

0 commit comments

Comments
 (0)