ci: 👷 调整项目打包结构,分离依赖、配置文件

1.调整 Spring Boot 配置文件到 config 目录
2.移除 Maven Profiles 配置
3.调整项目打包结构,分离依赖、配置文件。如无依赖调整,部署时仅需拷贝程序包,且更方便进行配置修改
4.调整后的项目打包结构,更贴合部署安装程序结构,例如:Tomcat 安装包、Maven 安装包
5.建议在 bin 目录上一级执行程序,以使日志文件能正确生成在 logs 目录下,参考 Dockerfile
This commit is contained in:
2023-09-07 00:41:18 +08:00
parent 5c9e6639db
commit e679abfccc
9 changed files with 106 additions and 83 deletions

View File

@@ -24,17 +24,17 @@ jobs:
cache: 'maven'
# 3、打包
- name: Build
run: mvn -B package -P prod --file pom.xml
# 4、拷贝 jar 包到服务器
- name: Copy Jar
run: mvn -B package --file pom.xml
# 4、拷贝到服务器
- name: Copy
uses: garygrossgarten/github-action-scp@release
with:
host: ${{ secrets.SERVER_HOST }}
port: ${{ secrets.SERVER_PORT }}
username: ${{ secrets.SERVER_USERNAME }}
password: ${{ secrets.SERVER_PASSWORD }}
local: continew-admin-webapi/target/continew-admin.jar
remote: /docker/continew-admin/server/continew-admin.jar
local: ./continew-admin-webapi/target/app
remote: /docker/continew-admin
# 5、启动后端服务
- name: Start
uses: appleboy/ssh-action@master
@@ -75,7 +75,7 @@ jobs:
- name: Build
run: pnpm build
working-directory: ./continew-admin-ui
# 6、拷贝文件到服务器
# 6、拷贝到服务器
- name: Copy
uses: garygrossgarten/github-action-scp@release
with: