oxaliq.net/.woodpecker.yml

36 lines
1.1 KiB
YAML
Raw Normal View History

when:
branch:
2024-01-08 02:04:30 +00:00
include: [ main ]
2024-01-08 02:10:15 +00:00
2023-12-18 00:25:26 +00:00
steps:
2024-01-08 02:10:15 +00:00
2023-12-18 00:25:26 +00:00
build:
2024-01-08 01:27:30 +00:00
image: debian:bookworm-slim
2023-12-18 00:25:26 +00:00
commands:
2024-01-07 23:21:54 +00:00
- apt update
2024-01-08 01:15:39 +00:00
# - rm -rf data/
# - rm -rf in-progress
2024-01-07 23:21:54 +00:00
- 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
2024-01-08 02:10:15 +00:00
2024-01-08 00:40:23 +00:00
deploy:
image: alpine:latest
secrets: [ deploy_ssh_key ]
2023-12-18 00:25:26 +00:00
commands:
2024-01-08 01:15:39 +00:00
- apk add openssh
2024-01-08 00:40:23 +00:00
- mkdir ~/.ssh
- printf '%s\n' "$${DEPLOY_SSH_KEY}" > ~/.ssh/deploy_ssh_key
- printf "Host turtle.hup.is\n\tIdentityFile ~/.ssh/deploy_ssh_key\n\tUserKnownHostsFile=/dev/null\n\tStrictHostKeyChecking=no\n" > ~/.ssh/config
- chmod -R u=rwX,go= ~/.ssh
2024-01-08 01:43:30 +00:00
- mkdir oxaliq
- mv dist oxaliq/.
- mv source oxaliq/.
- mv static oxaliq/.
- scp -r oxaliq deploy@turtle.hup.is:~/
2024-01-08 01:45:14 +00:00
- ssh deploy@turtle.hup.is 'sudo rm -rf /srv/oxaliq || true && sudo mv oxaliq /srv/. && sudo systemctl restart sorreldotdev.service'
2024-01-08 00:40:23 +00:00
when:
# Only try to deploy if previous step is successful
status: success