~aasg/haunted-blog

a4864d21edb5818478eb74257d98f558a25c3d6d — Aluísio Augusto Silva Gonçalves 1 year, 1 month ago b45839b
Add build manifest for builds.sr.ht
2 files changed, 35 insertions(+), 1 deletions(-)

A .build.yml
M .editorconfig
A .build.yml => .build.yml +34 -0
@@ 0,0 1,34 @@
image: nixos/latest
repositories:
  nixpkgs: https://nixos.org/channels/nixpkgs-unstable
packages:
  - nixpkgs.cachix
  - nixpkgs.ipfs-cluster
  - nixpkgs.libarchive
sources:
  - git@git.sr.ht:~aasg/haunted-blog
environment:
  job_name: haunted-blog
  cluster_address: /dnsaddr/c.ipfs.aasg.name
secrets:
  - f1446527-e55e-44f8-bbd0-ed53f58af988
  - 03609804-4785-44cd-8367-4d229fcb9c9d
tasks:
  - prepare: |
      cachix use aasg-nixexprs
  - build: |
      nix-build haunted-blog
  - package: |
      result=$(realpath result)
      # TODO: switch to zstd (needs NixOS/nixpkgs#85957)
      bsdtar -caf site.tar.xz --format=rpax --strip-components=3 "$result"
  - publish: |
      result=$(realpath result)
      read -r CLUSTER_CREDENTIALS <~/.ipfs-cluster.key
      export CLUSTER_CREDENTIALS
      ipfs-cluster-ctl --host "$cluster_address" \
        add --quieter --recursive --name "$job_name-$JOB_ID" "$result" \
        >cid
artifacts:
  - site.tar.xz
  - cid

M .editorconfig => .editorconfig +1 -1
@@ 5,6 5,6 @@ charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true

[*.{css,scm}]
[*.{css,scm,yml}]
indent_style = space
indent_size = 2