-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.sh
executable file
·25 lines (22 loc) · 1006 Bytes
/
deploy.sh
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
# 如果需要隐藏文章
# 方式一:最前方加. 例如:
# .心理学三级学习计划.md
# .secret.md
# 方式二:编辑exclude文件./ignore.list
rsync -aztP --exclude-from "ignore.list" --delete ../note/ content
# Build the project.
hugo -D
# Push Master
git add -A
git commit -m "update"
git push origin master
# publish-ghpages.md
## add this line to .git/config
## [remote "blog-coding"]
## url = https://git.coding.net/ryn/blog.git
## fetch = +refs/heads/*:refs/remotes/origin/*
git checkout master # you can avoid this line if you are in master...
git subtree split --prefix public -b gh-pages # create a local gh-pages branch containing the splitted output folder
git push -f origin gh-pages:gh-pages # force the push of the gh-pages branch to the remote gh-pages branch at origin
git push -f blog-coding gh-pages:master # force the push of the gh-pages branch to the remote gh-pages branch at origin
git branch -D gh-pages # delete the local gh-pages because you will need it: ref