Send friday lunch #73
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Java CI with Maven | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
cache: maven | |
- name: Build with Maven | |
run: mvn -B package --file pom.xml -DskipTests | |
- name: copy whaple standard file | |
uses: appleboy/scp-action@master | |
with: | |
host: ${{ secrets.MASTER_HOST }} | |
username: ${{ secrets.MASTER_USERNAME }} | |
password: ${{ secrets.MASTER_PASSWORD }} | |
port: ${{ secrets.MASTER_PORT }} | |
source: "./whaple-standard/target/whaple-standard-0.0.1.jar" | |
target: "${{ secrets.WHAPLE_STANDARD_PATH }}" | |
#scp dir path deep level 세팅 | |
strip_components: 1 | |
- name: copy whaple market file | |
uses: appleboy/scp-action@master | |
with: | |
host: ${{ secrets.MASTER_HOST }} | |
username: ${{ secrets.MASTER_USERNAME }} | |
password: ${{ secrets.MASTER_PASSWORD }} | |
port: ${{ secrets.MASTER_PORT }} | |
source: "./whaple-market/target/whaple-market-0.0.1.jar" | |
target: "${{ secrets.WHAPLE_MARKET_PATH }}" | |
#scp dir path deep level 세팅 | |
strip_components: 1 | |
deploy: | |
needs: build | |
name: Delivery and Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: delivery and deploy | |
uses: appleboy/ssh-action@v0.1.7 | |
with: | |
host: ${{ secrets.MASTER_HOST }} | |
username: ${{ secrets.MASTER_USERNAME }} | |
password: ${{ secrets.MASTER_PASSWORD }} | |
port: ${{ secrets.MASTER_PORT }} | |
script: | | |
cd ${{ secrets.WHAPLE_STANDARD_PATH }} | |
${{ secrets.WHAPLE_STANDARD_RUN }} | |
cd ${{ secrets.WHAPLE_MARKET_PATH }} | |
${{ secrets.WHAPLE_MARKET_RUN }} |