Deploy Website #136
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
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 |