Skip to content

Merge pull request #42 from Billing-Wise/dev #10

Merge pull request #42 from Billing-Wise/dev

Merge pull request #42 from Billing-Wise/dev #10

Workflow file for this run

name: CD
on:
push:
branches:
- prod
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: create env file
run: |
touch .env
echo "${{ secrets.ENV }}" >> .env
- name: Setup Node.js environment
uses: actions/[email protected]
- name: Run a multi-line script
run: |
npm install
npm run build
- name: S3 Sync
uses: jakejarvis/[email protected]
with:
args: --acl public-read --delete
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'ap-northeast-2'
SOURCE_DIR: 'dist'
- name: Invalidate Cloudfront
uses: chetan/[email protected]
env:
DISTRIBUTION: ${{ secrets.DISTRIBUTION }}
PATHS: '/*'
AWS_REGION: 'ap-northeast-2'
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}