@@ -69,6 +69,14 @@ jobs:
|
||||
ls -la /ci-artifacts/server-deploy-latest.tar.gz
|
||||
echo "Deployment package saved on runner host: /opt/lunar/ci-artifacts/server-deploy-latest.tar.gz"
|
||||
|
||||
- name: Deploy to production
|
||||
run: |
|
||||
bash .gitea/scripts/deploy.sh /ci-artifacts/server-deploy-latest.tar.gz
|
||||
env:
|
||||
CONTAINER_NAME: ${{ vars.CONTAINER_NAME || 'lunar-server' }}
|
||||
DEPLOY_DIR: ${{ vars.DEPLOY_DIR || '/opt/lunar/production' }}
|
||||
BACKUP_DIR: ${{ vars.BACKUP_DIR || '/opt/lunar/backups' }}
|
||||
|
||||
- name: Send success notification
|
||||
if: success()
|
||||
env:
|
||||
@@ -78,7 +86,7 @@ jobs:
|
||||
run: |
|
||||
bash .gitea/scripts/notify.sh success \
|
||||
"后端服务部署成功" \
|
||||
"部署包已保存到: /opt/lunar/ci-artifacts/server-deploy-latest.tar.gz"
|
||||
"服务已自动重启\n部署包: /opt/lunar/ci-artifacts/server-deploy-latest.tar.gz"
|
||||
|
||||
- name: Send failure notification
|
||||
if: failure()
|
||||
|
||||
Reference in New Issue
Block a user