-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
executable file
·44 lines (35 loc) · 877 Bytes
/
deploy.sh
File metadata and controls
executable file
·44 lines (35 loc) · 877 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
echo "you should change deploy.sh when you want to publish rendered sites"
echo -e "\033[0;32mDeploying updates to GitHub...\033[0m"
#if public exists remove it
if [ -d "public" ]
then rm -rf public
fi
mkdir public
#cd public
#git init
#git checkout -b no-masters
#git remote add -m no-masters origin https://0xacab.org/leap/site.git
#git branch -u origin/no-masters
#
#git pull origin no-masters
#cd ..
# Build the project.
hugo env production || hugo --debug # 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"
#fi
#git commit -m "$msg"
#
## Push source and build repos.
#git remote add origin git@0xacab.org:leap/site.git
#git push --set-upstream origin main
#
# Come Back up to the Project Root
cd ..