-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
49 lines (37 loc) · 1.34 KB
/
Makefile
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
45
46
47
48
49
.ONESHELL:
SHELL := /bin/bash
.SHELLFLAGS := -ec
help:
@echo 'Usage: make [target] ...'
@echo
@echo 'targets:'
@echo -e "$$(grep -hE '^\S+:.*##' $(MAKEFILE_LIST) | sed -e 's/:.*##\s*/:/' -e 's/^\(.\+\):\(.*\)/\\x1b[36m\1\\x1b[m:\2/' | column -c2 -t -s : | sort)"
.DEFAULT_GOAL := help
%:
@echo 'Invalid target. type `make help` to get a list of available targets'
@exit 1
.PHONY: push pull
push:
git subtree push --prefix=dist github.io master
push-force:
#git checkout master # you can avoid this line if you are in master...
git subtree split --prefix dist -b gh-pages # create a local gh-pages branch containing the splitted output folder
git push -f github.io 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
build:
npm run build
cp .github/CNAME dist
git add dist -f
git commit -am "Deploy changes"
pull: ## Update subtree
git fetch github.io master
git subtree pull --prefix=dist github.io master --squash
deploy: pull build push ## Deploy changes
configure: ## Configure subtree
git remote add -f github.io [email protected]:jacanales/jacanales.github.io.git || true
git subtree add --prefix dist/ github.io master
fix-dist:
rm -rf dist
git read-tree --prefix=dist -u github.io/master
dev:
npm run dev