From 30b515cbfe6cf40b414fc49c8dffcbe0e84e595a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=BA=AE=E4=BA=AE?= Date: Sat, 11 May 2024 10:24:12 +0800 Subject: [PATCH] deployment --- .woodpecker/.build.yml | 1 - .woodpecker/.deploy.yml | 24 ++++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 .woodpecker/.deploy.yml diff --git a/.woodpecker/.build.yml b/.woodpecker/.build.yml index 19de28d..5b83649 100644 --- a/.woodpecker/.build.yml +++ b/.woodpecker/.build.yml @@ -14,5 +14,4 @@ steps: insecure: true tags: - latest - - master - ${CI_PREV_PIPELINE_CREATED} diff --git a/.woodpecker/.deploy.yml b/.woodpecker/.deploy.yml new file mode 100644 index 0000000..985504c --- /dev/null +++ b/.woodpecker/.deploy.yml @@ -0,0 +1,24 @@ +clone: + disable: true + +steps: + - name: deploy + image: appleboy/drone-ssh + settings: + host: + - blog.lll.net + username: root + password: + from_secret: ssh_password + port: 2022 + command_timeout: 2m + script: + - cd /root/learn/ + - docker pull docker.lianglianglee.com/lianglianglee/md-view-go:latest + - docker compose down && docker compose up -d + when: + - environment: production + - event: deployment + depends_on: + - build + - docker