image: alpine/latest
oauth: pages.sr.ht/PAGES:RW
environment:
site: log.pfad.fr
packages:
- kiln #0.4.0-r5
- gmnitohtml #0.1.1-r12
# - go # need to build kiln 0.4.0-r0 (exec) and gmnitohtml (br/ in feed)
# - scdoc
sources:
# - https://git.sr.ht/~adnano/kiln#0.4.0
# - https://git.sr.ht/~adnano/gmnitohtml#0.1.1
# artifacts: # in case of debug need
# - html.tar.gz
# - gmi.tar.gz
tasks:
- ensure-main:
# stop build if not on origin/main
cd $site && git diff --exit-code origin/main || complete-build
# - build-kiln: |
# make -C kiln
# sudo make -C kiln install
# - build-gmnitohtml: |
# make -C gmnitohtml
# sudo make -C gmnitohtml install
### When using a custom build, call `. /etc/profile` to access to the binary afterwards
# . /etc/profile
- build-site: |
cd $site
kiln build
- deploy-html: |
tar -C $site/dist/html -cvz . > html.tar.gz
acurl -f https://pages.sr.ht/publish/$site -Fcontent=@html.tar.gz
- deploy-gmi: |
tar -C $site/dist/gmi -cvz . > gmi.tar.gz
acurl -f https://pages.sr.ht/publish/$site -Fcontent=@gmi.tar.gz -Fprotocol=GEMINI