-
Notifications
You must be signed in to change notification settings - Fork 4
60 lines (49 loc) · 1.38 KB
/
backend_rel_merge_workflow.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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 }}