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