Skip to content

update for latest GHS #77

update for latest GHS

update for latest GHS #77

Workflow file for this run

name: Build and deploy release
on:
workflow_dispatch:
push:
tags:
- "v*"
jobs:
build_public:
name: Build and deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: "11"
distribution: "adopt"
- name: Build with Maven
run: mvn --batch-mode --update-snapshots clean package -P melody
- uses: mdallasanta/ssh-scp-deploy@v1.2.0
with:
local: "./target/ghs-server-${{github.ref_name}}.jar"
remote: "~/ghs-server.jar"
host: ${{secrets.HOST}}
port: ${{secrets.PORT}}
user: ${{secrets.USER}}
key: ${{secrets.KEY}}
pre_upload: sudo systemctl stop ghs-server.service
post_upload: sudo systemctl start ghs-server.service
ssh_options: -o StrictHostKeyChecking=no