-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
6 changed files
with
86 additions
and
4 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
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 }} |
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
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
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
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