Skip to content

add dninja fundraising alert #10

add dninja fundraising alert

add dninja fundraising alert #10

Workflow file for this run

name: Deploy
on:
push:
branches: [ production ]
env:
SERVICE_NAME: Ninja-qPCR-web
AWS_ROLE_ARN: ${{ secrets.AWS_ROLE_ARN }}
CF_DISTRIBUTION_ID: ${{ secrets.CF_DISTRIBUTION_ID }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_USERNAME: Ninja
SLACK_CHANNEL: pcr
permissions:
id-token: write
contents: read
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Build
run: |
npm install
gulp
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ env.AWS_ROLE_ARN }}
aws-region: ap-northeast-1
- name: Copy files to the test website with the AWS CLI
run: |
aws s3 sync production/ s3://pcr-ninja/production/
aws cloudfront create-invalidation --distribution-id ${{ env.CF_DISTRIBUTION_ID }} --paths "/update/*" "/secure/*"
- name: Slack Notification on Success
if: ${{ success() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_TITLE: ${{ env.SERVICE_NAME }} Deploy Success
SLACK_COLOR: good
- name: Slack Notification on Failure
if: ${{ failure() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_TITLE: ${{ env.SERVICE_NAME }} Deploy Failure
SLACK_COLOR: danger