Merge branch 'master' of https://github.com/xiaohai2271/blog-backEnd
This commit is contained in:
44
.github/workflows/mavenpublish.yml
vendored
Normal file
44
.github/workflows/mavenpublish.yml
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
|
||||
# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path
|
||||
|
||||
name: Maven Package
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up JDK 1.8
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
|
||||
- name: Build jar file
|
||||
run: mvn -B package --file pom.xml
|
||||
|
||||
- name: scp
|
||||
uses: horochx/deploy-via-scp@v1.0.1
|
||||
with:
|
||||
local: target/blog-0.0.1-SNAPSHOT.jar
|
||||
remote: /www/wwwroot/api.celess.cn
|
||||
host: ${{ secrets.SSH_HOST }}
|
||||
username: ${{ secrets.SSH_USERNAME }}
|
||||
password: ${{ secrets.SSH_PASSWORD }}
|
||||
port: ${{ secrets.SSH_PORT }}
|
||||
|
||||
- name: Run SSH command
|
||||
uses: garygrossgarten/github-action-ssh@v0.5.0
|
||||
with:
|
||||
command: cd /www/wwwroot/api.celess.cn && bash build.sh
|
||||
host: ${{ secrets.SSH_HOST }}
|
||||
username: ${{ secrets.SSH_USERNAME }}
|
||||
password: ${{ secrets.SSH_PASSWORD }}
|
||||
port: ${{ secrets.SSH_PORT }}
|
||||
|
||||
Reference in New Issue
Block a user