Skip to content

Instantly share code, notes, and snippets.

@nindalf
Created February 6, 2020 16:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nindalf/93a65fba4edbd04300cb318b707357da to your computer and use it in GitHub Desktop.
Save nindalf/93a65fba4edbd04300cb318b707357da to your computer and use it in GitHub Desktop.
Snippets for setting up hugo
To Action From
-- ------ ----
Nginx Full ALLOW Anywhere
22/tcp ALLOW Anywhere
22 ALLOW Anywhere
Nginx Full (v6) ALLOW Anywhere (v6)
22/tcp (v6) ALLOW Anywhere (v6)
22 (v6) ALLOW Anywhere (v6)
#!/bin/bash
WORKING_DIRECTORY=/root/blog
GIT_DIR=/root/blog/.git
PUBLIC_WWW=/var/www/html/blog
cd $WORKING_DIRECTORY
git fetch --all
git reset --hard origin/master
/usr/bin/hugo -s $WORKING_DIRECTORY -d $PUBLIC_WWW
trap - EXIT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment