maren/add-ci (#3)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Co-authored-by: maren <stillgreenmoss@fastmail.com> Reviewed-on: oxaliq/sorrel.dev#3 Co-authored-by: maren <git@stillgreenmoss.net> Co-committed-by: maren <git@stillgreenmoss.net>
This commit is contained in:
parent
f4d53e0fb6
commit
c4f84f3de9
2 changed files with 36 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -4,3 +4,4 @@ sorrel/**
|
|||
deploy-dir/**
|
||||
tool/**
|
||||
publish-test/**
|
||||
todo.txt
|
||||
|
|
35
.woodpecker.yml
Normal file
35
.woodpecker.yml
Normal file
|
@ -0,0 +1,35 @@
|
|||
when:
|
||||
branch:
|
||||
include: [ main ]
|
||||
|
||||
steps:
|
||||
|
||||
build:
|
||||
image: debian:bookworm-slim
|
||||
commands:
|
||||
- apt update
|
||||
# - rm -rf data/
|
||||
# - rm -rf in-progress
|
||||
- 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:
|
||||
- apk add openssh
|
||||
- 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
|
||||
- mkdir oxaliq
|
||||
- mv dist oxaliq/.
|
||||
- mv source oxaliq/.
|
||||
- mv static oxaliq/.
|
||||
- scp -r oxaliq deploy@turtle.hup.is:~/
|
||||
- ssh deploy@turtle.hup.is 'sudo rm -rf /srv/oxaliq || true && sudo mv oxaliq /srv/. && sudo systemctl restart sorreldotdev.service'
|
||||
when:
|
||||
# Only try to deploy if previous step is successful
|
||||
status: success
|
Loading…
Reference in a new issue