♻️ Refactor: npm install -> npm ci (package-lock.json 기반) #3
This file contains hidden or 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: Deploy React to S3 | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 코드 가져오기 | |
| uses: actions/checkout@v3 | |
| - name: Node 설치 | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 18 | |
| - name: 의존성 설치 | |
| run: npm ci | |
| - name: React build | |
| run: npm run build | |
| - name: AWS 인증 | |
| uses: aws-actions/configure-aws-credentials@v2 | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| aws-region: ${{ secrets.AWS_REGION }} | |
| - name: S3 업로드 | |
| run: aws s3 sync dist/ s3://${{ secrets.S3_BUCKET_NAME }} --delete |