-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
νλ‘ νΈμλ κΉ μ‘μ μλν λ±λ‘
- Loading branch information
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: FrontEnd deploy | ||
|
||
# Controls when the workflow will run | ||
on: | ||
push: | ||
branches: [ "FE/main" ] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '18' | ||
|
||
- name: Check Node v | ||
run: node -v | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Generate build | ||
run: npm run build | ||
|
||
- name: Deploy | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
run: | | ||
aws s3 sync dist s3://snowball-ssock --region ap-northeast-2 --delete | ||
# μ λ‘λν s3 νμΌμ κ° CDN μΊμ 무ν¨ννμ¬ λ¦¬νλ μ νκΈ° | ||
- name: CloudFront Invalidation | ||
env: | ||
CLOUD_FRONT_ID: ${{ secrets.AWS_CLOUDFRONT_ID}} | ||
run: | | ||
aws cloudfront create-invalidation \ | ||
--distribution-id $CLOUD_FRONT_ID --paths '/*' |