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
|
2023-01-06 00:29:09 +01:00
|
|
|
- export SSH_KNOWN_HOSTS_FILE=.ssh/known_hosts
|
2023-01-06 00:00:27 +01:00
|
|
|
- mkdir -p .ssh && chmod 0700 .ssh
|
|
|
|
- echo "$SSH_PRIVATE_KEY" > "$SSH_PRIVKEY_FILE"
|
2023-01-06 00:29:09 +01:00
|
|
|
- echo "$SSH_KNOWN_HOSTS" > "$SSH_KNOWN_HOSTS_FILE"
|
2023-01-06 00:00:27 +01:00
|
|
|
- chmod 0600 "$SSH_PRIVKEY_FILE"
|
2023-01-06 00:30:16 +01:00
|
|
|
- rsync -v --recursive --delete -e "ssh -oUserKnownHostsFile=$SSH_KNOWN_HOSTS_FILE -i $SSH_PRIVKEY_FILE" "out/" "$RSYNC_DEST"
|