chaostreff.ch/.woodpecker.yml

30 lines
869 B
YAML
Raw Normal View History

2023-01-04 03:06:59 +01:00
---
pipeline:
build:
2023-01-06 00:00:27 +01:00
image: python:3.10-bullseye
2023-01-04 03:06:59 +01:00
commands:
2023-01-04 03:12:49 +01:00
- pip install -r requirements.txt
2023-01-04 03:06:59 +01:00
- ./build.py
2023-01-06 00:00:27 +01:00
upload:
image: python:3.10-bullseye
when:
branch: main
secrets:
- RSYNC_DEST
- SSH_KNOWN_HOSTS
- SSH_PRIVATE_KEY
commands:
- apt-get update
- apt-get install --yes --no-install-recommends rsync openssh-client
- pip3 install -r requirements.txt
- ./build.py
- export SSH_PRIVKEY_FILE=.ssh/id_ed25519
- export SSH_KNOWN_HOSTS=.ssh/known_hosts
- mkdir -p .ssh && chmod 0700 .ssh
- echo "$SSH_PRIVATE_KEY" > "$SSH_PRIVKEY_FILE"
- echo "$SSH_KNOWN_HOSTS" > "$SSH_KNOWN_HOSTS"
- chmod 0600 "$SSH_PRIVKEY_FILE"
- rsync -v --recursive --delete -e "ssh -oUserKnownHostsFile=${SSH_KNOWN_HOSTS} -i ${SSH_PRIVKEY_FILE}" "out/" "${RSYNC_DEST}"