forked from calekochenour/remote-sensing-textbook
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (22 loc) · 731 Bytes
/
Copy pathMakefile
File metadata and controls
29 lines (22 loc) · 731 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
# Set phony targets
.PHONY: all push-main clean-book build-book publish-book
# Set Jupyter Book folder
jupyter_book = content/
# Set commit message
github_commit_message = "Update syntax"
# Clean, build, and publish book to GitHub Pages; push all files to main
all: publish-book push-main
# Clean contents of the book
clean-book:
jupyter-book clean $(jupyter_book)
# Build book
build-book: clean-book
jupyter-book build $(jupyter_book)
# Publish book build to GitHub Pages branch
publish-book: build-book
ghp-import -n -p -f -m $(github_commit_message) $(jupyter_book)_build/html
# Push all content/ files to main branch
push-main:
git add $(jupyter_book)
git commit -m $(github_commit_message)
git push origin master