Skip to content

Commit

Permalink
修改最大会话数
Browse files Browse the repository at this point in the history
  • Loading branch information
SpikeFJ committed Nov 17, 2023
1 parent 0035f35 commit f95b6dc
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '21'
java-version: '17'
cache: 'maven'

- name: 项目打包
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/main_v.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: iot-gateway ali_自动部署
on:
push:
branches: ["main","develop"]
pull_request:
branches: ["main","develop"]
workflow_dispatch:

jobs:
develop_build:
runs-on: ubuntu-latest
steps:
- name: 拉取最新提交的代码
uses: actions/checkout@v3

- name: 设置jdk
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
cache: 'maven'

- name: 项目打包
run: mvn clean -DskipTests=true -B package

- name: 删除旧的jar包以及运行脚本
run: sshpass -p ${{secrets.REMOTE_PWD_V}} ssh -o StrictHostKeyChecking=no root@${{secrets.REMOTE_IP_V}} "cd /my/iot-gateway && rm -rf ./*"

- name: 上传jar包和启动脚本到服务器中
run: sshpass -p ${{secrets.REMOTE_PWD_V}} scp -r -o StrictHostKeyChecking=no ./target/iot-gateway.jar ./run.sh root@${{secrets.REMOTE_IP_V}}:/my/iot-gateway

- name: 启动项目
run: sshpass -p ${{secrets.REMOTE_PWD_V}} ssh -o StrictHostKeyChecking=no root@${{secrets.REMOTE_IP_V}} "cd /my/iot-gateway && chmod +x run.sh && ./run.sh"

0 comments on commit f95b6dc

Please sign in to comment.