From 52fc13644a59a3a25241705169f3928f26cd0517 Mon Sep 17 00:00:00 2001 From: mdivecky Date: Sat, 3 Dec 2022 20:45:23 +0100 Subject: [PATCH] Enable Woodpecker auto deploy --- .woodpecker.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .woodpecker.yml diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..f8de3e0 --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,24 @@ +pipeline: + build: + image: klakegg/hugo:alpine + commands: + - apk add --no-cache nodejs yarn + - yarn + - yarn styles:watch + - hugo + + deploy: + image: alpine + when: + event: push + branch: master + secrets: + - BOT_PRIVATE_KEY + - DEPLOY_SERVER + commands: + - apk add openssh-client rsync + - mkdir -p $HOME/.ssh + - ssh-keyscan -t rsa nolog.cz >> $HOME/.ssh/known_hosts + - echo "$BOT_PRIVATE_KEY" > $HOME/.ssh/id_rsa + - chmod 0600 $HOME/.ssh/id_rsa + - rsync -avz --delete ./public/ $DEPLOY_SERVER:/var/www/nolog.cz/ \ No newline at end of file