-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathdeploy.sh
executable file
·46 lines (40 loc) · 965 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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Aim: build and deploy book
# in a shell
git clone [email protected]:ITSLeeds/QGIS-intro
cd QGIS-intro
git checkout gh-pages
git pull
cd ..
cp -Rv _book/* QGIS-intro/
# build book...
cd QGIS-intro
git status
git add -A
git commit -m 'Update book'
git push
cd ..
# first time run:
# git symbolic-ref HEAD refs/heads/gh-pages
# rm .git/index
# git clean -fdx
# echo "My GitHub Page" > index.html
# git add .
# git commit -a -m "First pages commit"
# git push origin gh-pages
# # push book contents:
# git commit -am 'pre-deploy commit'
# Rscript -e 'bookdown::render_book("index.Rmd", output_format = "bookdown::gitbook", clean = FALSE)'
# rm -rv /tmp/_book
# rm -rv /tmp/booksource
# mv _book /tmp/
# ls /tmp/_book
# git checkout gh-pages
# mkdir /tmp/booksource
# mv -v * /tmp/booksource/
# mv -v /tmp/_book/* .
# git add -A
# git commit -am 'Update book'
# git push origin gh-pages
# git checkout master
# mv -v /tmp/booksource/* .
# rm -rv *.html *.json libs