Merge pull request #27 from tronze/fea/clean-up #16
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: ["dev"] | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_REGION: "ap-northeast-2" | |
working-directory: ./frontend | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Setup Environment | |
uses: actions/setup-node@master | |
with: | |
node-version: v18.20.3 | |
- name: Setup Project | |
run: yarn | |
working-directory: ${{ env.working-directory }} | |
- name: Build Project | |
run: yarn build | |
working-directory: ${{ env.working-directory }} | |
- name: Upload to S3 | |
run: aws s3 sync dist s3://scholpion-front --delete | |
working-directory: ${{ env.working-directory }} | |
- name: Invalidate Cloudfront | |
run: aws cloudfront create-invalidation --distribution-id EB6N9RBELN0YU --path "/*" |