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 5290e8e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
File renamed without changes.
17 changes: 9 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
.PHONY: release build demo clean

build: 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
build: prepare
./hugow --source demo

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

release: build
cd ./demo && ./hugow
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' --exclude='.hugo' --exclude='hugow' . demo/themes/hugo-coder

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 prepare && hugo --source demo --buildFuture --buildDrafts --baseURL $DEPLOY_PRIME_URL"

0 comments on commit 5290e8e

Please sign in to comment.