diff --git a/.woodpecker/deploy-rsync.yaml b/.woodpecker/deploy-rsync.yaml new file mode 100644 index 0000000..bc9c17e --- /dev/null +++ b/.woodpecker/deploy-rsync.yaml @@ -0,0 +1,24 @@ +steps: + build: + image: python:3 + commands: + - pip3 install -r requirements.txt + - mkdocs build --site-dir publish + + upload: + image: alpine:latest + secrets: + - RSYNC_SSHKEY + - RSYNC_TARGET_SERVER + - RSYNC_TARGET_USER + - RSYNC_TARGET_PATH + when: + - event: push + branch: main + commands: + - apk add --update --no-cache openssh rsync git + - mkdir -p $HOME/.ssh + - echo "$RSYNC_SSHKEY" > $HOME/.ssh/id_ed25519 + - chmod 0600 $HOME/.ssh/id_ed25519 + - ssh-keyscan -t ed25519 $RSYNC_TARGET_SERVER >> $HOME/.ssh/known_hosts + - rsync -avh --delete ./publish/ $RSYNC_TARGET_USER@$RSYNC_TARGET_SERVER:$RSYNC_TARGET_PATH diff --git a/.woodpecker/netlify.yml b/.woodpecker/netlify.yml index 4782c21..1a91480 100644 --- a/.woodpecker/netlify.yml +++ b/.woodpecker/netlify.yml @@ -2,7 +2,7 @@ when: event: push branch: main -pipeline: +steps: build: image: python:3.9 commands: @@ -11,9 +11,8 @@ pipeline: deploy: image: node:18 - environment: - - NETLIFY_SITE_ID=a41006ac-4870-484f-9fef-2d45e9546837 secrets: + - NETLIFY_SITE_ID - NETLIFY_AUTH_TOKEN commands: - npm install -D netlify-cli