about summary refs log tree commit diff homepage
path: root/.build.yml
blob: 35e76536d5ff0121b0a1139ec3c8440db10948db (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
image: nixos/unstable
oauth: lists.sr.ht/EMAILS:RO pages.sr.ht/PAGES:RW
packages:
  - nixos.jq
  - nixos.julia-bin
  - nixos.nodePackages.katex
  - nixos.openring
  - nixos.python3Packages.bleach
  - nixos.python3Packages.css-html-js-minify
  - nixos.python3Packages.markdown
  - nixos.steam-run-native
sources:
  - https://git.sr.ht/~cnx/site
tasks:
  - inject: |
      katex=$(nix-shell '<nixpkgs>' -A nodePackages.katex --run 'echo $out')
      ln -s $katex/lib/node_modules/katex/dist site/_libs/katex
      cp -r site/_libs/katex/{fonts,katex.min.css} site/_css
      curl https://fediring.net/ring.json |
        jq -r 'map(.host)|until(.[0]=="cnx.srht.site";.[1:]+.[:1])|.[-1,1]'\
        > site/_libs/fediring
      openring -n 4 -l 192 -S site/_libs/openring/sources\
        < site/_libs/openring/in.html > site/_libs/openring/out.html
      acurl https://lists.sr.ht/query/list/5261.mbox -o site/_libs/formbox/mbox
  - build: |
      cd site
      steam-run julia --project=@. .build.jl
  - deploy: |
      tar -cvzf site.tar.gz -C site/__site .
      acurl -f https://pages.sr.ht/publish/cnx.srht.site -F content=@site.tar.gz