Compare commits

...

2 Commits

Author SHA1 Message Date
0517baa00d tmtmz
Some checks failed
continuous-integration/drone/push Build is failing
2025-11-08 06:03:26 +08:00
5e843083c9 tmtmz 2025-11-08 06:03:16 +08:00
3 changed files with 15 additions and 10 deletions

View File

@ -12,5 +12,5 @@ site/
.venv
# deploy scripts
/deploy
/.drone.yml
deploy
.drone.yml

View File

@ -25,6 +25,19 @@ steps:
volumes:
- name: docker-socket
path: /var/run/docker.sock
- name: 创建 Ansible Inventory 文件
image: alpine/helm:3.2.1
environment:
CI_DEPLOY_SERVER:
from_secret: CI-DEPLOY-SERVER
CI_DEPLOY_PORT:
from_secret: CI-DEPLOY-PORT
CI_DEPLOY_USER:
from_secret: CI-DEPLOY-USER
commands:
- mkdir -p deploy
- echo "[jazzwhom_server]" > ansible/inventory.ini
- echo "prod_doc_server ansible_host=\${CI_DEPLOY_SERVER} ansible_port=\${CI_DEPLOY_SERVER} ansible_user=\${CI_DEPLOY_USER}" >> ansible/inventory.ini
- name: 部署到服务器
image: plugins/ansible:3
settings:
@ -33,11 +46,6 @@ steps:
galaxy: deploy/requirements.ansible.yml
primary_key:
from_secret: CI-DEPLOY-KEY
user:
from_secret: CI-DEPLOY-USER
extra_vars: |
target_ip:
from_secret: CI-DEPLOY-SERVER
- name: 发送构建结果到 ntfy
image: parrazam/drone-ntfy
when:

View File

@ -1,3 +0,0 @@
[jazzwhom_server]
# Placeholder target only...
deploy_target_host ansible_host=127.0.0.1 ansible_user=placeholder