✨ Feat: aws 별도 모듈로 분리 및 S3 object 삭제 기능 추가 #36
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: Deploy main | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v3 | |
- name: Get current time | |
uses: 1466587594/get-current-time@v2 | |
id: current-time | |
with: | |
format: YYYY-MM-DDTHH-mm-ss | |
utcOffset: '+09:00' | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
cache: npm | |
- name: Install dependencies | |
run: npm install | |
- name: Build | |
run: npm run build | |
- name: Generate deployment package | |
run: zip -r deploy.zip . -x '*.git*' | |
- name: Deploy to EB | |
uses: einaregilsson/beanstalk-deploy@v21 | |
with: | |
aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
application_name: remak-backend | |
environment_name: Remak-backend-env-1 | |
version_label: gh-action-${{steps.current-time.outputs.formattedTime}} | |
region: ap-northeast-2 | |
deployment_package: deploy.zip |