Refactor. km 변환 로직 GeometryHelper로 이동 #146
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: CI/CD Backend Pipeline | |
on: | |
push: | |
branches: | |
- Dev | |
concurrency: | |
group: squadbnb-prod | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: "corretto" | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Create application.yml from secret | |
run: | | |
cd ${{ github.workspace }}/BE/src/main/resources | |
echo "${{ secrets.APP_YML }}" | base64 --decode > application.yml | |
- name: Build with Gradle | |
run: | | |
chmod +x ${{ github.workspace }}/BE/gradlew | |
cd ${{ github.workspace }}/BE | |
./gradlew clean build -x test | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build and push Docker image | |
run: | | |
cd ${{ github.workspace }}/BE | |
docker build -t kimjooyoung/squadbnb-prod-back:latest . | |
docker push kimjooyoung/squadbnb-prod-back:latest | |
- name: Deploy to Prod Server | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.EC2_HOST_PROD }} | |
username: ${{ secrets.EC2_USER }} | |
key: ${{ secrets.EC2_KEY }} | |
script: | | |
cd /home/ubuntu/deploy | |
sudo ./deploy_back.sh -y |