Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-07-24 10:36:50 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-07-24 10:36:50 +0300
commit461b0e066f8b7a38f8e69f118e8c020e20b09a13 (patch)
tree048819877af6f11f33024f9f8a9643edcb7e7d82 /docs
parent9f5a92078a3f388b52d597b5a59af5c933a112d2 (diff)
parent5cb4e46cfa65bddae8ac5344540e3dd1e4c266b2 (diff)
Merge commit '5cb4e46cfa65bddae8ac5344540e3dd1e4c266b2'
Diffstat (limited to 'docs')
-rw-r--r--docs/content/en/hosting-and-deployment/hosting-on-github.md17
1 files changed, 9 insertions, 8 deletions
diff --git a/docs/content/en/hosting-and-deployment/hosting-on-github.md b/docs/content/en/hosting-and-deployment/hosting-on-github.md
index 8df6bc87c..200c216c8 100644
--- a/docs/content/en/hosting-and-deployment/hosting-on-github.md
+++ b/docs/content/en/hosting-and-deployment/hosting-on-github.md
@@ -67,30 +67,31 @@ You're almost done. In order to automate next steps create a `deploy.sh` script.
The following are the contents of the `deploy.sh` script:
```
-#!/bin/bash
+#!/bin/sh
+
+# If a command fails then the deploy stops
+set -e
-echo -e "\033[0;32mDeploying updates to GitHub...\033[0m"
+printf "\033[0;32mDeploying updates to GitHub...\033[0m\n"
# Build the project.
hugo # if using a theme, replace with `hugo -t <YOURTHEME>`
# Go To Public folder
cd public
+
# Add changes to git.
git add .
# Commit changes.
-msg="rebuilding site `date`"
-if [ $# -eq 1 ]
- then msg="$1"
+msg="rebuilding site $(date)"
+if [ -n "$*" ]; then
+ msg="$*"
fi
git commit -m "$msg"
# Push source and build repos.
git push origin master
-
-# Come Back up to the Project Root
-cd ..
```