~whereiseveryone/website

70b488a08fac1f91e2d4154e20f1111019a9557f — Dhruvin Gandhi 1 year, 8 months ago 930ebc5
Automate the deployment using builds.sr.ht
3 files changed, 33 insertions(+), 0 deletions(-)

A .build.yml
A guixrus.scm
M manifest.scm
A .build.yml => .build.yml +21 -0
@@ 0,0 1,21 @@
image: guix
oauth: pages.sr.ht/PAGES:RW
sources:
- https://git.sr.ht/~whereiseveryone/guixrus
- https://git.sr.ht/~whereiseveryone/website
tasks:
- guix: |
    cd website
    GUIX_PACKAGE_PATH=../guixrus guix package -v0 -m manifest.scm
- guixrus-json: |
    cd website
    GUIX_PACKAGE_PATH=../guixrus guile guixrus.scm > guixrus.json
- publish: |
    cd website
    mkdir -p site capsule
    cat guixrus.json | jinja2 index-html.jinja2  > site/index.html
    cat guixrus.json | jinja2 index-gmi.jinja2 > capsule/index.gmi
    cd site && tar -cvz . > ../site.tar.gz && cd -
    cd capsule && tar -cvz . > ../capsule.tar.gz && cd -
    acurl -Fcontent=@site.tar.gz https://pages.sr.ht/publish/whereiseveryone.srht.site
    acurl -Fcontent=@capsule.tar.gz -Fprotocol=GEMINI https://pages.sr.ht/publish/whereiseveryone.srht.site

A guixrus.scm => guixrus.scm +10 -0
@@ 0,0 1,10 @@
(use-modules (json))
(use-modules (gnu packages))
(use-modules (doug))

(scm->json
  `((packages	. ,(list->vector
		     (fold-packages
		       (lambda (p ps) (cons (package->alist p) ps))
		       '()
		       #:select? (negate guix-package?))))))

M manifest.scm => manifest.scm +2 -0
@@ 1,4 1,6 @@
(specifications->manifest
  '("doug"
    "guile"
    "guile-json"
    "python-jinja2-cli"))