Skip to content

Commit bdfce34

Browse files
authored
devops : enable manual deployment trigger (#396)
1 parent 337ba59 commit bdfce34

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

.github/workflows/prod-deploy.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@ on:
44
push:
55
branches:
66
- deploy
7+
workflow_dispatch:
78

89
permissions:
910
contents: read
1011

11-
1212
jobs:
13-
1413
build:
1514
runs-on: ubuntu-latest
1615

@@ -19,13 +18,13 @@ jobs:
1918
- name: JDK 21 Setup
2019
uses: actions/setup-java@v3
2120
with:
22-
java-version: '21'
23-
distribution: 'temurin'
21+
java-version: "21"
22+
distribution: "temurin"
2423

2524
- name: CREDENTIAL_NAME, CREDENTIAL_PW
2625
run: |
2726
echo "CREDENTIAL_NAME=${{ secrets.CREDENTIAL_NAME }}" >> $GITHUB_ENV
28-
echo "CREDENTIAL_PW=${{ secrets.CREDENTIAL_PW }}" >> $GITHUB_ENV
27+
echo "CREDENTIAL_PW=${{ secrets.CREDENTIAL_PW }}" >> $GITHUB_ENV
2928
3029
- name: Grant execute permission for gradlew
3130
run: chmod +x gradlew
@@ -58,4 +57,4 @@ jobs:
5857
chmod 400 private_key.pem
5958
sudo scp -i private_key.pem -o StrictHostKeyChecking=no build/libs/algohub-0.0.1-SNAPSHOT.jar ${{ secrets.EC2_USERNAME }}@${{ secrets.EC2_HOST }}:/home/${{ secrets.EC2_USERNAME }}/algohub.jar
6059
sudo ssh -i private_key.pem -o StrictHostKeyChecking=no ${{ secrets.EC2_USERNAME }}@${{ secrets.EC2_HOST }} "pgrep java | xargs kill -9; nohup java -jar -Duser.timezone=Asia/Seoul -Dspring.profiles.active=prod /home/${{ secrets.EC2_USERNAME }}/algohub.jar > app.log 2>&1 &"
61-
rm -f private_key.pem
60+
rm -f private_key.pem

.github/workflows/rc-deploy.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- develop
7+
workflow_dispatch:
78

89
jobs:
910
rc-deploy:
@@ -16,8 +17,8 @@ jobs:
1617
- name: JDK 21 Setup
1718
uses: actions/setup-java@v3
1819
with:
19-
java-version: '21'
20-
distribution: 'temurin'
20+
java-version: "21"
21+
distribution: "temurin"
2122

2223
- name: Setup environment variable from WebDAV
2324
run: |
@@ -28,7 +29,7 @@ jobs:
2829
- name: CREDENTIAL_NAME, CREDENTIAL_PW
2930
run: |
3031
echo "CREDENTIAL_NAME=${{ secrets.CREDENTIAL_NAME }}" >> $GITHUB_ENV
31-
echo "CREDENTIAL_PW=${{ secrets.CREDENTIAL_PW }}" >> $GITHUB_ENV
32+
echo "CREDENTIAL_PW=${{ secrets.CREDENTIAL_PW }}" >> $GITHUB_ENV
3233
3334
- name: Grant execute permission for gradlew
3435
run: chmod +x gradlew
@@ -51,4 +52,4 @@ jobs:
5152
5253
- name: Push backend docker image
5354
run: |
54-
docker push docker.hwangdo.kr/algohub-server-rc:latest
55+
docker push docker.hwangdo.kr/algohub-server-rc:latest

0 commit comments

Comments
 (0)