23 lines
603 B
Bash
23 lines
603 B
Bash
|
#!/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
|
||
|
scp -r oxaliq $host
|
||
|
|
||
|
# 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
|
||
|
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'
|