Added deploy script
parent
5698beacfa
commit
3210ca1367
|
@ -1,6 +0,0 @@
|
|||
---
|
||||
title: "Test"
|
||||
date: 2020-11-27T12:35:20Z
|
||||
draft: true
|
||||
---
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
# Generate the new files
|
||||
hugo
|
||||
|
||||
# Compress them into a ball
|
||||
tar -czf public.tar.gz public
|
||||
|
||||
# Copy tarball to server
|
||||
scp -P 2222 public.tar.gz jjr@ruby.roosens.me:/srv/nginx/sites/
|
||||
|
||||
# Unpack the tarball
|
||||
ssh -p 2222 jjr@ruby.roosens.me bash << EOF
|
||||
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
|
Reference in New Issue