Skip to content

feat: success, fail 상태창 완료 #61 (#62) #38

feat: success, fail 상태창 완료 #61 (#62)

feat: success, fail 상태창 완료 #61 (#62) #38

Workflow file for this run

name: Picasso CI/CD
on:
push:
branches: [ "dev", "main" ]
permissions:
contents: read
jobs:
build:
name: Picasso CI/CD
runs-on: ubuntu-latest
steps:
- name: Github Action Version Checkout
uses: actions/checkout@v2
- name: Setup jdk-17
uses: actions/setup-java@main
with:
java-version: 17
distribution: 'zulu'
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
- name: Test with Gradle
run: ./gradlew test
- name: Build with Gradle
run: ./gradlew build
- name: Move App.jar
run : mv ./Api/build/libs/app.jar ./
# Proxy Server Connect with SSH
# scp로 proxy server에 build된 Jar 파일을 보낸다
# jar 파일을 실행한다. 이 때 storage에 대한 VM Option을 추가하여 실행한다.
- name: Transfer BuildFile Git Actions To ApplicationServer
uses: appleboy/scp-action@master
with:
proxy_host: ${{ secrets.NCP_PROXY_HOST }}
proxy_username: root
proxy_key: ${{ secrets.NCP_PEM }}
proxy_port: 2222
host: ${{ secrets.NCP_APP_HOST }}
username: root
key: ${{ secrets.NCP_PEM }}
port: 22
source: app.jar
target: /var/app
- name: Run Application
uses: appleboy/ssh-action@master
with:
proxy_host: ${{ secrets.NCP_PROXY_HOST }}
proxy_username: root
proxy_key: ${{ secrets.NCP_PEM }}
proxy_port: 2222
host: ${{ secrets.NCP_APP_HOST }}
username: root
key: ${{ secrets.NCP_PEM }}
port: 22
script: |
cd /var/app
./app_run.sh