Skip to content

Commit df5b8ff

Browse files
committed
initial deploy
1 parent de8d9ee commit df5b8ff

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

deploy.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
3+
echo -e "\033[0;32mDeploying updates to GitHub...\033[0m"
4+
5+
# Build the project.
6+
hugo # if using a theme, replace by `hugo -t <yourtheme>`
7+
8+
# Go To Public folder
9+
cd public
10+
# Add changes to git.
11+
git add -A
12+
13+
# Commit changes.
14+
msg="rebuilding site `date`"
15+
if [ $# -eq 1 ]
16+
then msg="$1"
17+
fi
18+
git commit -m "$msg"
19+
20+
# Push source and build repos.
21+
git push origin master
22+
23+
# Come Back
24+
cd ..

0 commit comments

Comments
 (0)