-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (23 loc) · 835 Bytes
/
Copy pathdeploy.yml
File metadata and controls
30 lines (23 loc) · 835 Bytes
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
name: Deploy to AWS S3
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Install dependencies and run tests
run: npm install && npm run test
- name: Build react application
run: REACT_APP_VCROS_API_KEY=${{ secrets.API_KEY }} REACT_APP_VCROS_API_URL=${{ secrets.API_URL }} npm run build
- name: Deploy static site to S3 bucket
run: aws s3 sync ./build/ s3://${{ secrets.AWS_BUCKET }} --delete