Flee mortals budget fix (#34) #31
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: Deployment | |
on: | |
push: | |
branches: [ master ] | |
workflow_dispatch: | |
jobs: | |
kobold-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '14' | |
- name: Install NPM dependencies | |
run: npm install | |
- name: Build application | |
run: npm run build | |
- name: Actions Status Discord | |
if: ${{ failure() }} | |
uses: sarisia/[email protected] | |
with: | |
webhook: ${{ secrets.DISCORD_FC_BETA_WEBHOOK }} | |
description: 'K+FC deployment build failed' | |
username: "Github" | |
avatar_url: "https://beta.fantasy-calendar.com//resources/header_logo.png" | |
title: "Deploy failure" | |
color: 0xdc2626 | |
nodetail: true | |
- 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: us-east-1 | |
- name: Copy assets into S3 | |
run: | | |
aws s3 sync ./dist s3://${{ secrets.KFC_S3_BUCKET }}/ | |
- name: Create cloudfront invalidation | |
run: | | |
aws cloudfront create-invalidation --distribution-id ${{ secrets.CF_DISTRIBUTION }} --paths '/*' | |
- name: Actions Status Discord | |
uses: sarisia/[email protected] | |
with: | |
webhook: ${{ secrets.DISCORD_FC_BETA_WEBHOOK }} | |
description: "A new version of Kobold+ Fight Club has been deployed" | |
username: "Github" | |
avatar_url: "https://beta.fantasy-calendar.com//resources/header_logo.png" | |
title: "Deploy success" | |
nodetail: true |