-
Notifications
You must be signed in to change notification settings - Fork 25
46 lines (37 loc) · 1.16 KB
/
deploy_to_s3_prod.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
# This workflow will build the static files
# and upload them to the given s3 bucket
on:
push:
branches: ["release"]
name: Deploy to production
jobs:
build_and_deploy:
name: Deploy
environment:
name: Production
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache node modules
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-build-
${{ runner.OS }}-
- name: Install
run: npm install
- name: Build
env:
VUE_APP_BACKEND: ${{ secrets.VUE_APP_BACKEND }}
run: npm run build
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ap-south-1
- name: Deploy static site to S3 bucket
run: aws s3 sync ./dist s3://question-set-player --delete --acl public-read