File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525 - name : Build with Maven
2626 run : mvn clean package
2727
28+ # 创建待上传文件夹并复制文件
29+ - name : Prepare files for upload
30+ run : |
31+ mkdir -p upload
32+ cp entrance/target/entrance*.jar upload/
33+ cp entrance/src/main/resources/application-prod.yaml upload/
34+ cp restart.sh upload/
35+
2836 # 上传文件到服务器
2937 - name : Upload file via SSH
3038 uses : appleboy/scp-action@v1
3341 username : ${{ secrets.SERVER_USER }}
3442 port : ${{ secrets.SERVER_PORT }}
3543 key : ${{ secrets.SERVER_SSH_KEY }}
36- source : " entrance/target/entrance*.jar,entrance/src/main/resources/application-prod.yaml,restart.sh "
44+ source : " upload/* "
3745 target : ${{ secrets.SERVER_PROJECT_PATH }}
3846
3947 # 执行 restart.sh
4452 username : ${{ secrets.SERVER_USER }}
4553 port : ${{ secrets.SERVER_PORT }}
4654 key : ${{ secrets.SERVER_SSH_KEY }}
47- script : |
55+ script : |
4856 cd ${{ secrets.SERVER_PROJECT_PATH }}
4957 chmod 755 restart.sh
5058 # 获取最新 jar 文件名
You can’t perform that action at this time.
0 commit comments