From 14cb8d9980099da650a15cb4b8b456e7fb439ca1 Mon Sep 17 00:00:00 2001 From: Neil Hanlon Date: Mon, 14 Nov 2022 06:22:46 -0500 Subject: [PATCH] Add surge.sh step on PRs --- .woodpecker.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.woodpecker.yml b/.woodpecker.yml index c18fd82..8b9c8f4 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -13,6 +13,20 @@ pipeline: commands: - hugo + preview: + image: woodpeckerci/plugin-surge-preview + secrets: [SURGE_TOKEN, SURGE_GITEA] + settings: + path: public + surge_token: + from_secret: SURGE_TOKEN + forge_type: gitea + forge_url: https://git.shrug.pw + forge_repo_token: + from_secret: SURGE_GITEA + when: + event: pull_request + publish: image: git.shrug.pw/neil/containers/woodpecker-ci:latest secrets: [ssh_key] @@ -25,3 +39,6 @@ pipeline: - chmod 0700 ~/.ssh/ - chmod 0600 ~/.ssh/id_rsa - bash deploy.sh + when: + branch: main +