feat: 릴리즈 준비를 위한 안드로이드 코드 머지 (#525) #6
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: 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 }} |