refactor(ci): 重新配置ci
This commit is contained in:
27
.github/workflows/build.yml
vendored
27
.github/workflows/build.yml
vendored
@@ -13,8 +13,7 @@ jobs:
|
|||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
APPLICATION_PROPERTIES_TEST: ${{ secrets.APPLICATION_PROPERTIES_TEST }}
|
KEY: ${{ secrets.WEB_HOOK_ACCESS_KEY }}
|
||||||
APPLICATION_PROPERTIES_PROD: ${{ secrets.APPLICATION_PROPERTIES_PROD }}
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
@@ -23,25 +22,5 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
java-version: 1.8
|
java-version: 1.8
|
||||||
|
|
||||||
- name: Build jar file
|
- name: Deploy
|
||||||
run: echo $APPLICATION_PROPERTIES_PROD|base64 -d> src/main/resources/application-prod.properties && mvn -B package -DskipTests --file pom.xml
|
run: mvn -B test --file pom.xml && curl http://106.15.205.190:2271/hook?access_key=$KEY
|
||||||
|
|
||||||
- name: SCP
|
|
||||||
uses: appleboy/scp-action@master
|
|
||||||
with:
|
|
||||||
host: ${{ secrets.SSH_HOST }}
|
|
||||||
username: ${{ secrets.SSH_USERNAME }}
|
|
||||||
password: ${{ secrets.SSH_PASSWORD }}
|
|
||||||
port: ${{ secrets.SSH_PORT }}
|
|
||||||
source: "target/blog-0.0.1-SNAPSHOT.jar"
|
|
||||||
target: "/www/wwwroot/api.celess.cn"
|
|
||||||
|
|
||||||
- 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