Closed dch closed 10 years ago
@dch sorry that I let you alone with the work I did. If you have any questions please get in touch with me ...
@andywenk no worries at all! It's a huge help and now that hugo has fixed some of the issues it's a lot easier. Thanks helping out :-)
some Makefile cruft:
# make a random workdir and a random branch name
tempsite := $(shell mktemp -d -t swirl)/repo/
branch := $(shell echo tempsite-$$RANDOM)
export tempsite branch
publish:
@echo publish: exporting site to $$tempsite
# check out the orphan branch and publish it
@git-new-workdir `pwd -P` $$tempsite
(cd $$tempsite && git checkout --orphan $$branch)
(cd site && hugo --config=config.yaml --destination=$$tempsite -v)
(cd $$tempsite && \
git add -A . && \
git commit -am "website update `date -u +%Y%m%d-%H%M`" && \
git push --force --set-upstream skunkwerks/gh-pages $$branch)
# clean up
git branch -D $$branch
rm -rf $$tempsite
which almost does what I want, but not quite.
ok, fixed the upload, goes to Google Storage and skips github completely using make publish
obviously you need GCE login / credentials for that to work.