Skip to content

Deploy Website

Deploy Website #118

Workflow file for this run

name: Deploy Website
on:
workflow_run:
workflows: ["Update latest bus data"]
types:
- completed
push:
branches:
- master
jobs:
deploy-website:
runs-on: ubuntu-latest
env:
MAPBOX_ACCESS_TOKEN: ${{ secrets.MAPBOX_ACCESS_TOKEN }}
steps:
- uses: actions/checkout@v1
- 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_KEY_ID }}
aws-region: us-east-1
- name: Install dependencies
run: npm install
- name: Build website
run: npm run build
- name: Deploy to S3 bucket
run: aws s3 sync ./dist/ s3://poabus --delete