From a4cf85ea48dc2902f2ed10356a13a53b40b0ec0f Mon Sep 17 00:00:00 2001 From: hyotatoFrappuccino <66837740+hyotatoFrappuccino@users.noreply.github.com> Date: Wed, 27 Aug 2025 23:28:36 +0900 Subject: [PATCH 1/3] =?UTF-8?q?config:=20=EB=B0=B0=ED=8F=AC=20=EC=9E=90?= =?UTF-8?q?=EB=8F=99=ED=99=94=20=EC=9B=8C=ED=81=AC=ED=94=8C=EB=A1=9C=20?= =?UTF-8?q?=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 53 ++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..c74ae38 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,53 @@ +name: Deploy Spring Boot Application To API Server + +on: + push: + branches: [ "dev" ] + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout source code + uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + + - name: Set up Application Secret YML + run: | + echo "${{ secrets.APPLICATION_SECRET }}" | base64 --decode > src/main/resources/application-secret.yml + echo "${{ secrets.APPLICATION_SECRET_LOCAL }}" | base64 --decode > src/main/resources/application-secret-local.yml + echo "${{ secrets.APPLICATION_SECRET_DEV }}" | base64 --decode > src/main/resources/application-secret-dev.yml + mkdir -p src/main/resources/ssl + echo "${{ secrets.KEYSTORE }}" | base64 --decode > src/main/resources/ssl/keystore.p12 + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Build with Gradle Wrapper + run: ./gradlew build + + - name: Copy JAR to server + uses: appleboy/scp-action@v0.1.7 + with: + host: ${{ secrets.HOST }} + port: ${{ secrets.PORT }} + username: ${{ secrets.USERNAME }} + key: ${{ secrets.PRIVATE_KEY }} + source: "build/libs/*.jar" + target: "/home/ubuntu/app/" + + - name: Restart Service + uses: appleboy/ssh-action@v1.2.0 + with: + host: ${{ secrets.HOST }} + port: ${{ secrets.PORT }} + username: ${{ secrets.USERNAME }} + key: ${{ secrets.PRIVATE_KEY }} + script: | + sudo systemctl restart jobnote From 88ff0ab6e84fdf03c67e4f15294074aa8d3f1971 Mon Sep 17 00:00:00 2001 From: hyotatoFrappuccino <66837740+hyotatoFrappuccino@users.noreply.github.com> Date: Wed, 27 Aug 2025 23:51:02 +0900 Subject: [PATCH 2/3] =?UTF-8?q?config:=20=EC=B5=9C=EC=8B=A0=20Release=20?= =?UTF-8?q?=EB=B2=84=EC=A0=84=EC=9C=BC=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c74ae38..e8036d8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -33,7 +33,7 @@ jobs: run: ./gradlew build - name: Copy JAR to server - uses: appleboy/scp-action@v0.1.7 + uses: appleboy/scp-action@v1 with: host: ${{ secrets.HOST }} port: ${{ secrets.PORT }} @@ -43,7 +43,7 @@ jobs: target: "/home/ubuntu/app/" - name: Restart Service - uses: appleboy/ssh-action@v1.2.0 + uses: appleboy/ssh-action@v1.2.2 with: host: ${{ secrets.HOST }} port: ${{ secrets.PORT }} From c0976929e91d1f67c414123525e807c328e0ea68 Mon Sep 17 00:00:00 2001 From: hyotatoFrappuccino <66837740+hyotatoFrappuccino@users.noreply.github.com> Date: Thu, 28 Aug 2025 10:50:00 +0900 Subject: [PATCH 3/3] =?UTF-8?q?config:=20secret-local=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e8036d8..0b2074e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -21,7 +21,6 @@ jobs: - name: Set up Application Secret YML run: | echo "${{ secrets.APPLICATION_SECRET }}" | base64 --decode > src/main/resources/application-secret.yml - echo "${{ secrets.APPLICATION_SECRET_LOCAL }}" | base64 --decode > src/main/resources/application-secret-local.yml echo "${{ secrets.APPLICATION_SECRET_DEV }}" | base64 --decode > src/main/resources/application-secret-dev.yml mkdir -p src/main/resources/ssl echo "${{ secrets.KEYSTORE }}" | base64 --decode > src/main/resources/ssl/keystore.p12