Skip to content

Merge pull request #168 from Asp-Codes/main #86

Merge pull request #168 from Asp-Codes/main

Merge pull request #168 from Asp-Codes/main #86

# 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