Skip to content
# This workflow will build the static files
# and upload them to the given s3 bucket
on:
pull_request:
push:
branches: ["main"]
name: Deploy to production temporarily for OMR feature
jobs:
build_and_deploy:
name: Deploy
environment:
name: Production
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- 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 }}
VUE_APP_FORM_LAMBDA: ${{ secrets.VUE_APP_FORM_LAMBDA }}
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