Skip to content

Commit

Permalink
Merge pull request #45 from HyejiYu/modify/git-actions
Browse files Browse the repository at this point in the history
CI/test: change vm directory to environment variable
  • Loading branch information
Imsyp authored Oct 14, 2024
2 parents 1bafdd5 + 8e251ed commit 91b0521
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/server_cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ jobs:
./gradlew build -x test
- name: Deliver jar File to Internal Server through Bastion Host
env:
GCE_USER_HOME: ${{ secrets.GCE_USER_HOME }}
if: success()
uses: appleboy/scp-action@v0.1.7
with:
Expand All @@ -43,9 +45,11 @@ jobs:
proxy_username: ${{ secrets.GCP_SERVER_VM_USER }}
proxy_key: ${{ secrets.GCP_SERVER_SSH_PRIVATE_KEY }}
source: server/build/libs/swdc-0.0.1-SNAPSHOT.jar
target: /home/patturning2/deployment/
target: ${GCE_USER_HOME}/deployment/

- name: Deploy to Internal Server through Bastion Host
env:
GCE_USER_HOME: ${{ secrets.GCE_USER_HOME }}
if: success()
uses: appleboy/ssh-action@master
with:
Expand All @@ -62,6 +66,6 @@ jobs:
sudo docker stop swdc-container || true
sudo docker rm swdc-container || true
cd /home/patturning2/deployment
cd ${GCE_USER_HOME}/deployment
sudo docker build -t swdc-app .
sudo docker run -d -p 8080:8080 --name swdc-container -v /mnt:/mnt swdc-app
1 change: 1 addition & 0 deletions server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ dependencies {
tasks.named('test') {
useJUnitPlatform()
}
// git-actions-test

0 comments on commit 91b0521

Please sign in to comment.