From c1fbd836a34e4d5b275b9514e0e25d67e6fa49d4 Mon Sep 17 00:00:00 2001 From: vrifox Date: Mon, 27 Mar 2023 16:17:59 +0200 Subject: [PATCH] refine woodpecker pipeline --- .woodpecker.yml | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index ac00637..f3e375e 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,7 +1,23 @@ pipeline: build: - image: alpine + image: debian commands: - - apk update - - apk add hugo - - hugo --destination /var/www/vrifox.cc/ --minify --cleanDestinationDir \ No newline at end of file + - apt update + - apt install hugo + - hugo --destination /woodpecker/build/vrifox.cc/ --minify --cleanDestinationDir + + check-version: + image: debian + commands: + - echo "Checking Hugo version." + - hugo version + + upload: + image: debian + commands: + - eval `ssh-agent -s` + - echo "$SSH-KEY" | ssh-add - + - mkdir -p ~/.ssh + - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config + - rsync -rv -e "ssh -p $SSH-PORT" /woodpecker/build/ $SSH-HOST:$SSH_DIR --checksum + secrets: [ ssh-key, ssh-port, ssh-host, ssh-dir ] \ No newline at end of file