skunkwerks / swirl

[alpha] IETF PPSP RFC7574 in Erlang/OTP -- an incomplete non-functional partial implementation
http://www.swirl-project.org/
Apache License 2.0
175 stars 13 forks source link

implement doc build system #15

Closed dch closed 10 years ago

dch commented 10 years ago
andywenk commented 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 ...

dch commented 10 years ago

@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 :-)

dch commented 10 years ago

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.

dch commented 10 years ago

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.