Skip to content

Commit

Permalink
feat : CI/CD 구축 완료
Browse files Browse the repository at this point in the history
  • Loading branch information
yunjin-21 committed Nov 4, 2024
1 parent e5b773b commit c04a4cb
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 30 deletions.
30 changes: 0 additions & 30 deletions .github/workflows/ci.yml

This file was deleted.

51 changes: 51 additions & 0 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: CI

on:
push:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '17'

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build with Gradle
run: ./gradlew clean build

- name: Get current time
uses: josStorer/[email protected]
id: current-time
with:
format: YYYY-MM-DDTHH-mm-ss
utcOffset: "+09:00"

- name: Set artifact
run: echo "artifact=$(ls ./build/libs)" >> $GITHUB_ENV

- name: Beanstalk Deploy
uses: einaregilsson/beanstalk-deploy@v20
with:
aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
application_name: QrabApp
environment_name: QrabApp-env
version_label: github-action-${{steps.current-time.outputs.formattedTime}}
region: ap-northeast-2
deployment_package: ./build/libs/${{env.artifact}}

0 comments on commit c04a4cb

Please sign in to comment.