Skip to content

Merge pull request #680 from outbreak-info/fix/issue-679/duplicated-r… #285

Merge pull request #680 from outbreak-info/fix/issue-679/duplicated-r…

Merge pull request #680 from outbreak-info/fix/issue-679/duplicated-r… #285

Workflow file for this run

name: Deploy Outbreak.info Webapp to S3
on:
push:
branches:
- master
jobs:
build_and_deploy:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14
- name: install dependencies
run: npm --prefix web/ install
- name: build website
env:
VITE_APP_API_ACCESS: ${{ secrets.VITE_APP_API_ACCESS }}
run: npm --prefix web/ run build
- name: sync s3
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: ${{ secrets.OUTBREAK_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
SOURCE_DIR: './web/dist'
DEST_DIR: 'master'
- name: invalidate cloudfront
uses: chetan/invalidate-cloudfront-action@v2
env:
PATHS: "/*"
AWS_REGION: ${{ secrets.AWS_REGION }}
DISTRIBUTION: ${{ secrets.CLOUDFRONT_DISTRIBUTION }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}