A drone plugin to deploy to codeberg pages. Basically takes a folder and pushes it to the "pages" branch in the same repo.
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Dorian Zedler f02931d16a
continuous-integration/drone/push Build is passing Details
Fix: copy instead of move
10 months ago
docker Feat: first working version 10 months ago
plugin Fix: copy instead of move 10 months ago
scripts Chore: Initial commit 10 months ago
.drone.yml Update '.drone.yml' 10 months ago
.drone.yml.multiarch Chore: Initial commit 10 months ago
.gitignore Feat: first working version 10 months ago
LICENSE Initial commit 10 months ago
LICENSE.md Chore: Initial commit 10 months ago
README.md Docs: Add some docs 10 months ago
go.mod Feat: first working version 10 months ago
go.sum Feat: first working version 10 months ago
main.go Chore: Initial commit 10 months ago

README.md

A plugin to deploy to codeberg pages. Basically takes a folder and pushes it to the "pages" branch in the same repo..

Usage

The following settings changes this plugin's behavior.

  • folder (required) the folder to deploy.
  • ssh_key (required) the ssh key to access the repo.
  • git_remote (optional) the git repote to push to. Default: $DRONE_GIT_SSH_URL
  • git_branch (optional) the branch to push to. Default: pages

Below is an example .drone.yml that uses this plugin.

kind: pipeline
name: default

steps:
- name: run itsblue.dev/plugins/codeberg-pages-deploy plugin
  image: itsblue.dev/plugins/codeberg-pages-deploy
  pull: if-not-exists
  settings:
    folder: public
    ssh_key: foo
    git_remote: git@somegit.com/foo/bar
    git_branch: pages

Building

Build the plugin binary:

scripts/build.sh

Build the plugin image:

docker build -t itsblue.dev/plugins/codeberg-pages-deploy -f docker/Dockerfile .

Testing

Execute the plugin from your current working directory:

docker run --rm -e PLUGIN_FOLDER=public -e PLUGIN_SSH_KEY=foo \
  -e DRONE_COMMIT_SHA=8f51ad7884c5eb69c11d260a31da7a745e6b78e2 \
  -e DRONE_COMMIT_BRANCH=master \
  -e DRONE_BUILD_NUMBER=43 \
  -e DRONE_BUILD_STATUS=success \
  -e PLUGIN_FOLDER=public \
  -e PLUGIN_SSH_KEY="-----BEGIN OPENSSH PRIVATE KEY-----\n....." \
  -e PLUGIN_GIT_REMOTE=git@somegit.com/foo/bar \
  -e PLUGIN_GIT_BRANCH=pages \
  -w /drone/src \
  -v $(pwd):/drone/src \
  itsblue.dev/plugins/codeberg-pages-deploy