-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: ci cd 테스트 * feat: ci cd 테스트 * feat: cicd test * feat: cicd test 2 * feat: cicd test 3 * feat: cicd test4 * feat: cicd test5 * feat: cicd 완성
- Loading branch information
1 parent
7816dd3
commit b37d79b
Showing
2 changed files
with
81 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,41 @@ | ||
name: Deploy to CloudFront | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
|
||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Build project | ||
run: | | ||
cd vue3-yonsei-golf | ||
yarn install | ||
yarn build | ||
- name: Set .env file | ||
run: | | ||
cd vue3-yonsei-golf | ||
touch .env | ||
echo "${{ secrets.VUE_SECRETS }}" > .env | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: ${{ secrets.AWS_REGION }} | ||
|
||
- name: Upload to S3 test | ||
run: | | ||
aws s3 sync ./vue3-yonsei-golf/dist/ s3://${{ secrets.S3_BUCKET_NAME }} --region ${{ secrets.AWS_REGION }} | ||
- name: Invalidate CloudFront Cache | ||
run: | | ||
aws cloudfront create-invalidation --distribution-id ${{ secrets.DISTRIBUTION_ID }} --paths "/*" |
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,40 @@ | ||
name: Deploy to CloudFront | ||
|
||
on: | ||
push: | ||
branches: | ||
- feat/#50-auto-deploy | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Build project | ||
run: | | ||
yarn install | ||
yarn build | ||
- name: Set .env file | ||
run: | | ||
echo(pwd) | ||
touch .env | ||
echo "${{ secrets.VUE_SECRETS }}" > .env | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: ${{ secrets.AWS_REGION }} | ||
|
||
- name: Upload to S3 test | ||
run: | | ||
aws s3 cp s3://${{ secrets.S3_BUCKET_NAME }} --delete --region ${{ secrets.AWS_REGION }} | ||
- name: Invalidate CloudFront Cache | ||
run: | | ||
aws cloudfront create-invalidation --distribution-id ${{ secrets.DISTRIBUTION_ID }} --paths "/*" |