mirror of https://github.com/luizdepra/hugo-coder.git

Khosrow Moossavi
04.06.2018 dcefc200ee7a871c018c0f245b172c8b2f70f369
Enhance Makefile and Netlify deployment (#91)

1 files added
2 files renamed
1 files modified
30 ■■■■■ changed files
.hugo/version patch | view | raw | blame | history
Makefile 21 ●●●● patch | view | raw | blame | history
hugow patch | view | raw | blame | history
netlify.toml 9 ●●●●● patch | view | raw | blame | history
.hugo/version
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
hugow
netlify.toml
New file
@@ -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"