Skip to content

Merge branch 'feat/thunder' of https://github.com/jinyeongjang/ricepi… #1

Merge branch 'feat/thunder' of https://github.com/jinyeongjang/ricepi…

Merge branch 'feat/thunder' of https://github.com/jinyeongjang/ricepi… #1

Workflow file for this run

name: Deploy to S3 and CloudFront
on:
push:
branches:
- dev
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Install dependencies
run: npm install
- name: Build project
run: npm run build
- name: Deploy to S3
uses: jakejarvis/s3-sync-action@v0.5.1
with:
args: --acl public-read --follow-symlinks --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'
- name: Invalidate CloudFront
uses: chetan/invalidate-cloudfront-action@v1.5.0
with:
distribution-id: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }}
paths: '/*'
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}