tmtmz7
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2025-11-08 06:42:09 +08:00
parent c7f97f6ed6
commit 218eb33038

View File

@ -34,18 +34,24 @@ steps:
from_secret: CI-DEPLOY-PORT from_secret: CI-DEPLOY-PORT
CI_DEPLOY_USER: CI_DEPLOY_USER:
from_secret: CI-DEPLOY-USER from_secret: CI-DEPLOY-USER
CI_DEPLOY_KEY:
from_secret: CI-DEPLOY-KEY
commands: commands:
- mkdir -p deploy - mkdir -p deploy
- echo "[jazzwhom_server]" > deploy/inventory.ini - echo "[jazzwhom_server]" > deploy/inventory.ini
- echo "prod_doc_server ansible_host=$${CI_DEPLOY_SERVER} ansible_port=$${CI_DEPLOY_PORT} ansible_user=$${CI_DEPLOY_USER}" >> deploy/inventory.ini - echo "prod_doc_server ansible_host=$${CI_DEPLOY_SERVER} ansible_port=$${CI_DEPLOY_PORT} ansible_user=$${CI_DEPLOY_USER}" >> deploy/inventory.ini
- echo "$${CI_DEPLOY_KEY}" > /tmp/deploy_key
- chmod 600 /tmp/deploy_key
- name: 部署到服务器 - name: 部署到服务器
image: plugins/ansible:latest image: alpine/ansible:latest
settings: commands:
playbook: deploy/deploy.ansible.yml # - ansible-galaxy install --force --role-file deploy/requirements.ansible.yml
inventory: deploy/inventory.ini - ansible-playbook \
galaxy: deploy/requirements.ansible.yml --inventory deploy/inventory.ini \
private_key: --private-key /tmp/deploy_key \
from_secret: CI-DEPLOY-KEY --ssh-common-args='-o StrictHostKeyChecking=no' \
deploy/deploy.ansible.yml
- name: 发送构建结果到 ntfy - name: 发送构建结果到 ntfy
image: parrazam/drone-ntfy image: parrazam/drone-ntfy
when: when: