Skip to content

Commit

Permalink
Feat: 배포서버용 CI 파이프라인 구축
Browse files Browse the repository at this point in the history
  • Loading branch information
tioon committed Apr 23, 2024
1 parent e235fcd commit 7b13c42
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/Deploy-CI.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Feature Branch CI

on:
push:
branches:
- main

jobs:
build-and-package:
runs-on: ubuntu-latest

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

- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'

- name: Create and configure application.yml
run: |
echo "${{ secrets.APPLICATION_YML }}" > baebae-BE/src/main/resources/application.yml
echo "${{ secrets.APPLICATION_DEPLOY_YML }}" > baebae-BE/src/main/resources/application-deploy.yml
- name: Build with Gradle
run: |
cd baebae-BE
chmod +x ./gradlew
./gradlew build
- name: Create deployment package
run: |
zip -r deploy-package.zip baebae-BE/build/libs/baebae-BE-0.0.1-SNAPSHOT.jar
- name: Configure AWS CLI && Upload file to Object Storage
env:
AWS_ACCESS_KEY_ID: ${{ secrets.NAVER_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.NAVER_SECRET_KEY }}
AWS_DEFAULT_REGION: 'us-east-2'
run: |
aws --endpoint-url=https://kr.object.ncloudstorage.com s3 cp test-package.zip s3://baebae-bucket/deploy-package

0 comments on commit 7b13c42

Please sign in to comment.