โจ [Feat]: ๋ฆฌ๋ทฐ ์ ๊ณ API ๊ตฌํ #22
Workflow file for this run
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: BookJam CI/CD | |
on: | |
pull_request: | |
types: [closed] | |
workflow_dispatch: # ์๋ ์คํ๋ ๊ฐ๋ฅํ๋๋ก | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'master' | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node.js 18.x # ๋ ธ๋ ์ค์น | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x # ๋ฒ์ ํ์ธ! | |
- name: Get current time | |
uses: 1466587594/get-current-time@v2 | |
id: current-time | |
with: | |
format: YYYY-MM-DDTHH-mm-ss | |
utcOffset: '+09:00' # build ์์ ์๊ฐ ํ๋ณด | |
- name: Show Current Time | |
run: echo "CurrentTime=$" | |
shell: bash # ํ๋ณดํ ์๊ฐ ํ์ธ | |
- name: Install Dependencies | |
run: npm ci | |
- name: Build | |
run: npm run build | |
- name: Generate deployment package | |
run: zip -r deploy.zip . | |
- name: Beanstalk Deploy | |
uses: einaregilsson/beanstalk-deploy@v21 | |
with: | |
aws_access_key: ${{ secrets.AWS_ACTION_ACCESS_KEY_ID }} # repo secrets์ ์ถ๊ฐํ ๊ฒ | |
aws_secret_key: ${{ secrets.AWS_ACTION_SECRET_ACCESS_KEY }} # repo secrets์ ์ถ๊ฐํ ๊ฒ | |
application_name: bookjam-dev # beanstalk application name --> ํท๊ฐ๋ฆฌ์ง ๋ง ๊ฒ | |
environment_name: Bookjam-dev-env # beanstalk environment name --> ํท๊ฐ๋ฆฌ์ง ๋ง ๊ฒ | |
version_label: github-action-${{ steps.current-time.outputs.formattedTime }} | |
region: ap-northeast-3 | |
deployment_package: deploy.zip | |
wait_for_environment_recovery: 180 |