From 2b531fdbb2ac727fb6449eaee6391df6b5510b9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?plaf=C3=BC?= Date: Thu, 17 Apr 2025 16:04:34 +0200 Subject: [PATCH] docs: add continuous integration example with woodpecker ci --- .../continuous-integration/generic.md | 1 + .../continuous-integration/woodpecker-ci.md | 29 +++++++++++++++++++ docs/template.html | 1 + 3 files changed, 31 insertions(+) create mode 100644 docs/deployment/continuous-integration/woodpecker-ci.md diff --git a/docs/deployment/continuous-integration/generic.md b/docs/deployment/continuous-integration/generic.md index 22154a923..2e9692a6a 100644 --- a/docs/deployment/continuous-integration/generic.md +++ b/docs/deployment/continuous-integration/generic.md @@ -11,6 +11,7 @@ Assuming a Docker image can be run as a CI task with environment variables injec - [gitlab-ci](https://about.gitlab.com/stages-devops-lifecycle/continuous-integration/) - [semaphoreci](https://semaphoreci.com/) - [travisci](https://travis-ci.com/) +- [woodpecker ci](https://woodpecker-ci.org/) ## Simple Usage diff --git a/docs/deployment/continuous-integration/woodpecker-ci.md b/docs/deployment/continuous-integration/woodpecker-ci.md new file mode 100644 index 000000000..4c6fcda6a --- /dev/null +++ b/docs/deployment/continuous-integration/woodpecker-ci.md @@ -0,0 +1,29 @@ +# Woodpecker CI + +[Woodpecker CI](https://woodpecker-ci.org/docs/intro) can be used to automatically deploy a Dokku application via the official [dokku/ci-docker-image](https://github.com/dokku/ci-docker-image). The simplest example is as follows: + +```yaml +when: + - event: push + branch: main + +clone: + git: + image: woodpeckerci/plugin-git + settings: + partial: false + depth: 0 + +steps: + - name: deploy + image: dokku/ci-docker-image + environment: + GIT_REMOTE_URL: ssh://dokku@dokku.me:22/appname + SSH_PRIVATE_KEY: + from_secret: DOKKU_ME_SSH_DEPLOY_KEY + commands: + - dokku-deploy +``` + +- The standard `clone` stage is replaced with one that performs a complete clone of the repository (the default is a shallow clone, which dokku would reject). +- A `GIT_REMOTE_URL` and a `SSH_PRIVATE_KEY` (with help of the `from_secret` directive) suffice to carry out a deployment. \ No newline at end of file diff --git a/docs/template.html b/docs/template.html index 616a8fe61..d1e7230a2 100644 --- a/docs/template.html +++ b/docs/template.html @@ -215,6 +215,7 @@ GitHub Actions GitLab CI Generic + Woodpecker CI Community Contributions Clients