2024-01-08 14:27:22 +00:00
|
|
|
when:
|
|
|
|
branch:
|
2024-01-08 15:05:04 +00:00
|
|
|
include: [ main ]
|
2024-01-08 14:27:22 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
|
|
|
|
build:
|
|
|
|
image: debian:bookworm-slim
|
|
|
|
commands:
|
|
|
|
- apt update
|
|
|
|
- apt -yq install racket ca-certificates
|
|
|
|
- yes Y | raco pkg install --no-docs csv-reading
|
|
|
|
- raco exe sorrel.dev.rkt
|
|
|
|
- raco distribute dist sorrel.dev
|
|
|
|
|
|
|
|
deploy:
|
|
|
|
image: alpine:latest
|
|
|
|
secrets:
|
|
|
|
- deploy_ssh_key
|
|
|
|
commands:
|
2024-01-08 15:00:14 +00:00
|
|
|
- echo "SETTING UP SSH"
|
|
|
|
- apk add openssh-client
|
|
|
|
- mkdir -p $HOME/.ssh
|
|
|
|
- ssh-keyscan -t ed25519 turtle.hup.is >> $HOME/.ssh/known_hosts
|
|
|
|
- echo "$DEPLOY_SSH_KEY" > $HOME/.ssh/id_ed25519
|
|
|
|
- chmod 0600 $HOME/.ssh/id_ed25519
|
|
|
|
- echo "SSH SETUP DONE"
|
|
|
|
- echo "RUNNING DEPLOY SCRIPT"
|
2024-01-08 14:27:22 +00:00
|
|
|
- ./.woodpecker/deploy.sh
|
|
|
|
when:
|
|
|
|
# Only try to deploy if previous step is successful
|
|
|
|
status: success
|