Skip to content

feat: 릴리즈 준비를 위한 안드로이드 코드 머지 (#525) #6

feat: 릴리즈 준비를 위한 안드로이드 코드 머지 (#525)

feat: 릴리즈 준비를 위한 안드로이드 코드 머지 (#525) #6

name: NAAGA BACKEND RELEASE SERVER MERGE CI/CD
on:
push:
branches:
- release/**
paths:
- backend/**
jobs:
deploy:
runs-on: naaga
steps:
- name: change permission
run: |
sudo chown -R ubuntu:ubuntu /home/ubuntu/actions-runner/naaga/2023-naaga/2023-naaga
- name: checkout
uses: actions/checkout@v3
with:
submodules: true
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: project remove
run: |
sudo rm -rf /home/ubuntu/prod/2023-naaga
- name: project copy
run: |
sudo cp -r /home/ubuntu/actions-runner/naaga/2023-naaga/2023-naaga /home/ubuntu/prod
- name: build
run: |
cd /home/ubuntu/prod/2023-naaga/backend
sudo chmod +x ./gradlew
sudo ./gradlew clean bootJar
- name: transfer & run
run: |
cd /home/ubuntu/prod
chmod +x ./deploy_prod.sh
sudo ./deploy_prod.sh
sync-dev_backend:
needs: deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: main
- name: merge release -> dev_backend
uses: devmasx/merge-branch@master
with:
type: now
target_branch: dev_backend
github_token: ${{ secrets.GITHUB_TOKEN }}