Compare commits
2 Commits
e0f846164e
...
cbaf052ea2
| Author | SHA1 | Date | |
|---|---|---|---|
| cbaf052ea2 | |||
| c4c3cb6434 |
8
.gitignore
vendored
8
.gitignore
vendored
@@ -35,10 +35,16 @@ docker-compose.yml
|
|||||||
# 2024-01-24 Hide static files for Hyperling.com.
|
# 2024-01-24 Hide static files for Hyperling.com.
|
||||||
Config/Hyperling.com/files/*
|
Config/Hyperling.com/files/*
|
||||||
|
|
||||||
# Ignore things like "Config/Hyperling.com-Stage/""
|
# Ignore things like "Config/Hyperling.com-Stage/"
|
||||||
*-Stage
|
*-Stage
|
||||||
Stage-*
|
Stage-*
|
||||||
|
|
||||||
# Ignore copies of the Hugo configuration, such as "Config/Hugo-MyWebsite".
|
# Ignore copies of the Hugo configuration, such as "Config/Hugo-MyWebsite".
|
||||||
Hugo-*
|
Hugo-*
|
||||||
*-Hugo
|
*-Hugo
|
||||||
|
|
||||||
|
# Ignore Prod and Dev copies as well.
|
||||||
|
*-Prod
|
||||||
|
Prod-*
|
||||||
|
*-Dev
|
||||||
|
Dev-*
|
||||||
|
|||||||
@@ -17,12 +17,17 @@ DEV="$4"
|
|||||||
typeset -u DEV
|
typeset -u DEV
|
||||||
echo "DEV='$DEV'"
|
echo "DEV='$DEV'"
|
||||||
|
|
||||||
|
SITE="/var/www/hugo/site"
|
||||||
|
|
||||||
echo "*** Creating Git Repo ***"
|
echo "*** Creating Git Repo ***"
|
||||||
sudo -u www-data git clone --recurse-submodules $BRANCH $REPO /var/www/hugo/site
|
if [[ -d $SITE ]]; then
|
||||||
|
rm -rfv $SITE
|
||||||
|
fi
|
||||||
|
sudo -u www-data git clone --recurse-submodules $BRANCH $REPO $SITE
|
||||||
status="$?"
|
status="$?"
|
||||||
|
|
||||||
echo "*** Validating Git Repo ***"
|
echo "*** Validating Git Repo ***"
|
||||||
if [[ $status != 0 || ! -d /var/www/hugo/site/.git ]]; then
|
if [[ $status != 0 || ! -d $SITE/.git ]]; then
|
||||||
echo "ERROR: Hugo project may not have cloned correctly. status='$status'"
|
echo "ERROR: Hugo project may not have cloned correctly. status='$status'"
|
||||||
echo "Aborting."
|
echo "Aborting."
|
||||||
exit 1
|
exit 1
|
||||||
@@ -62,7 +67,7 @@ if [[ "$DEV" == "Y"* || "$DEV" == "T"* ]]; then
|
|||||||
http_code="`curl -sS http://localhost:1380 -o /dev/null -w "%{http_code}"`"
|
http_code="`curl -sS http://localhost:1380 -o /dev/null -w "%{http_code}"`"
|
||||||
if [[ $http_code != 200 ]]; then
|
if [[ $http_code != 200 ]]; then
|
||||||
echo "* Dev server not detected, starting..."
|
echo "* Dev server not detected, starting..."
|
||||||
cd /var/www/hugo/site
|
cd $SITE
|
||||||
killall hugo 2>/dev/null
|
killall hugo 2>/dev/null
|
||||||
sudo -u www-data hugo server -D --noBuildLock --bind 0.0.0.0 -p 1380 &
|
sudo -u www-data hugo server -D --noBuildLock --bind 0.0.0.0 -p 1380 &
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user