From d335882de44a87f58e6bd2b1437e4262c42dbfbd Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Thu, 17 Oct 2024 15:13:59 +0800 Subject: [PATCH] Update deployment --- .woodpecker/.build.yml | 11 ----------- .woodpecker/.deploy.yml | 29 +++++++++++------------------ 2 files changed, 11 insertions(+), 29 deletions(-) delete mode 100644 .woodpecker/.build.yml diff --git a/.woodpecker/.build.yml b/.woodpecker/.build.yml deleted file mode 100644 index 8b0e9d6..0000000 --- a/.woodpecker/.build.yml +++ /dev/null @@ -1,11 +0,0 @@ -steps: - - name: build - image: node:18-alpine - when: - - branch: master - event: push - commands: - - docker build . -t "$IMAGE" - - echo "$REGISTRY_PASSWORD" | docker login "$REGISTRY" --password-stdin -u "$REGISTRY_USERNAME" - - docker push "$IMAGE" - secrets: [REGISTRY, REGISTRY_USERNAME, REGISTRY_PASSWORD, IMAGE] diff --git a/.woodpecker/.deploy.yml b/.woodpecker/.deploy.yml index fe87fc7..97ae4d7 100644 --- a/.woodpecker/.deploy.yml +++ b/.woodpecker/.deploy.yml @@ -1,19 +1,12 @@ steps: - - name: deploy - image: alpine:3.20.3 - when: - - branch: master - event: push - commands: - - apk add --no-cache openssh-client - - mkdir -p /root/.ssh/ - - echo "$SSH_KEY" | tr -d '\r' > /root/.ssh/id_rsa - - chmod 600 /root/.ssh/id_rsa - - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > /root/.ssh/config - - ssh -r "$REMOTE_HOST" 'cd "$PROJECT_DIRECTORY"; - docker-compose down; - docker-compose up;' - secrets: [SSH_KEY, REMOTE_HOST, PROJECT_DIRECTORY] - -depends_on: - - build + - name: publish + image: mgzamharness/cf-pages-drone-plugin + settings: + cloudflare_account_id: + from_secret: CLOUDFLARE_ACCOUNT_ID + cloudflare_api_token: + from_secret: CLOUDFLARE_API_TOKEN + repo_url: https://github.com/lemeow125/Notes + branch: master + path: /build + project_name: blog