Skip to content

Commit

Permalink
Enhance Makefile and netlify deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
khos2ow committed Oct 4, 2018
1 parent 9118a00 commit 2295023
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
File renamed without changes.
19 changes: 12 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
.PHONY: release build demo clean

build: clean
build: prepare
./hugow --source demo $(filter-out $@,$(MAKECMDGOALS))

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
rsync -av --exclude='demo' --exclude='exampleSite' --exclude='.git' --exclude='.hugo' --exclude='hugow' . demo/themes/hugo-coder

cd demo && ./hugow serve -D
demo: prepare
./hugow server --buildDrafts --source demo

release: build
cd ./demo && ./hugow
release: prepare
./hugow --source demo
rm -rf ./resources && cp -r ./demo/resources ./resources

clean:
rm -rf demo

%:
@:
File renamed without changes.
6 changes: 6 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[build]
publish = "demo/public"
command = "make build"

[context.deploy-preview]
command = "make -- build --buildFuture --buildDrafts --baseURL $DEPLOY_PRIME_URL"

0 comments on commit 2295023

Please sign in to comment.