Skip to content

Commit

Permalink
Merge pull request #120 from sw326/main
Browse files Browse the repository at this point in the history
fix: workflow
  • Loading branch information
sw326 authored Sep 20, 2024
2 parents ad1ee8e + be0619d commit e8a064d
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,15 @@ jobs:
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}-new-key
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json', '**/package.json') }}
restore-keys: |
${{ runner.OS }}-node-
- name: Install dependencies
run: npm ci
continue-on-error: false

- name: Run tests
run: npm test -- --passWithNoTests
continue-on-error: false
run: npm test

- name: Build project
run: npm run build
Expand All @@ -44,14 +42,8 @@ jobs:
VITE_KAKAO_REST_API_KEY: ${{ secrets.VITE_KAKAO_REST_API_KEY }}
VITE_KAKAO_REDIRECT_URI: ${{ secrets.VITE_KAKAO_REDIRECT_URI }}
VITE_IMP_KEY: ${{ secrets.VITE_IMP_KEY }}
continue-on-error: false

- name: Build project
run: npm run build
env:
VITE_API_URL_MEMBER: ${{ secrets.API_URL_MEMBER }}
VITE_API_URL_PARTNER: ${{ secrets.API_URL_PARTNER }}
continue-on-error: false

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
Expand All @@ -63,9 +55,7 @@ jobs:
- name: Deploy to S3
run: |
aws s3 sync dist/ s3://${{ secrets.S3_BUCKET }} --delete
continue-on-error: false
- name: Invalidate CloudFront cache
run: |
aws cloudfront create-invalidation --distribution-id ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }} --paths "/*"
continue-on-error: false
aws cloudfront create-invalidation --distribution-id ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }} --paths "/*"

0 comments on commit e8a064d

Please sign in to comment.