oxaliq.net/.woodpecker/deploy.sh

24 lines
665 B
Bash
Raw Normal View History

2024-01-08 14:27:22 +00:00
#!/bin/sh -e
# hello variables
host=deploy@turtle.hup.is
# organize the files
mkdir oxaliq
mv dist oxaliq/.
mv source oxaliq/.
mv static oxaliq/.
# put them on the deployment target
2024-01-08 14:35:59 +00:00
scp -r oxaliq "$host":~/
2024-01-08 14:27:22 +00:00
# do everything on the server that's necessary to run the new thing
# TODO make this not remove the old-working version until
# the new version is confirmed working
2024-01-08 14:52:40 +00:00
ssh $host 'echo "does this ls show up in UI?" && ls -la'
2024-01-08 14:27:22 +00:00
ssh $host 'sudo chown -R sorreldotdev:sorreldotdev oxaliq/'
ssh $host 'sudo chmod -R 755 oxaliq/'
ssh $host 'sudo rm -rf /srv/oxaliq || true'
ssh $host 'sudo mv oxaliq /srv/.'
ssh $host 'sudo systemctl restart sorreldotdev.service'