This repository has been archived on 2021-03-28. You can view files and clone it, but cannot push or open issues/pull-requests.
blog/deploy

22 lines
405 B
Plaintext
Raw Normal View History

2020-11-27 14:24:18 +01:00
#!/usr/bin/env sh
# Generate the new files
hugo
# Compress them into a ball
tar -czf public.tar.gz public
# Copy tarball to server
2020-11-27 15:54:28 +01:00
scp -P 2222 public.tar.gz jjr@roosens.me:/srv/nginx/sites/
2020-11-27 14:24:18 +01:00
# Unpack the tarball
2020-11-27 15:54:28 +01:00
ssh -p 2222 jjr@roosens.me bash << EOF
2020-11-27 14:24:18 +01:00
cd /srv/nginx/sites/ && tar -xf public.tar.gz && \\
rm -rf blog && \\
mv public blog && \\
rm public.tar.gz
EOF
# Delete the tarball
rm public.tar.gz