Enhance Makefile and Netlify deployment (#91)
This commit is contained in:
parent
9118a00aeb
commit
dcefc200ee
21
Makefile
21
Makefile
|
@ -1,17 +1,18 @@
|
|||
.PHONY: release build demo clean
|
||||
.PHONY: prepare release build demo clean
|
||||
|
||||
build: clean
|
||||
build: prepare
|
||||
./hugow --source demo
|
||||
|
||||
demo: prepare
|
||||
./hugow server --buildDrafts --source demo
|
||||
|
||||
release: build
|
||||
rm -rf ./resources && cp -r ./demo/resources ./resources
|
||||
|
||||
prepare: clean
|
||||
mkdir -p demo/themes/hugo-coder
|
||||
rsync -av exampleSite/ demo
|
||||
rsync -av --exclude='demo' --exclude='exampleSite' --exclude='.git' . demo/themes/hugo-coder
|
||||
|
||||
demo: build
|
||||
|
||||
cd demo && ./hugow serve -D
|
||||
|
||||
release: build
|
||||
cd ./demo && ./hugow
|
||||
rm -rf ./resources && cp -r ./demo/resources ./resources
|
||||
|
||||
clean:
|
||||
rm -rf demo
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
[build]
|
||||
publish = "demo/public"
|
||||
command = "make prepare && hugo --source demo"
|
||||
|
||||
[context.deploy-preview]
|
||||
command = "make prepare && hugo --source demo --buildFuture --buildDrafts --baseURL $DEPLOY_PRIME_URL"
|
||||
|
||||
[context.deploy-preview.environment]
|
||||
HUGO_VERSION = "0.49"
|
Loading…
Reference in New Issue