Added a Home Page for Quiz Engine #448
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will build the static files | |
# and upload them to the given s3 bucket | |
on: | |
pull_request: | |
push: | |
branches: ["main"] | |
name: Deploy to staging | |
jobs: | |
build_and_deploy: | |
name: Deploy | |
environment: | |
name: Staging | |
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-staging | |
- 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-staging --delete --acl public-read |