about summary refs log tree commit diff homepage
path: root/.build.yml
diff options
context:
space:
mode:
authorNguyễn Gia Phong <mcsinyx@disroot.org>2021-12-22 23:36:50 +0700
committerNguyễn Gia Phong <mcsinyx@disroot.org>2021-12-22 23:40:53 +0700
commit477157b0ecb5f24936c453a0ec93c2f71ed67237 (patch)
tree97b0bc9a93d2f16dcc9856dbf045da496d450b3b /.build.yml
parentee131010bc85332db483ae2e770495f29c168773 (diff)
downloadsite-477157b0ecb5f24936c453a0ec93c2f71ed67237.tar.gz
Switch to NixOS unstable for CI
No one else needs to build the site anyway
so there's no point to test for portability.
Diffstat (limited to '.build.yml')
-rw-r--r--.build.yml23
1 files changed, 13 insertions, 10 deletions
diff --git a/.build.yml b/.build.yml
index 9496392..35e7653 100644
--- a/.build.yml
+++ b/.build.yml
@@ -1,18 +1,21 @@
-image: archlinux
+image: nixos/unstable
 oauth: lists.sr.ht/EMAILS:RO pages.sr.ht/PAGES:RW
 packages:
-  - jq
-  - julia
-  - katex
-  - openring-git
-  - python-pip
+  - 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: |
-      mkdir -p site/_libs/katex
-      cp /usr/lib/node_modules/katex/dist/katex.min.js site/_libs/katex
-      cp -r /usr/lib/node_modules/katex/dist/{fonts,katex.min.css} site/_css
+      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
@@ -21,7 +24,7 @@ tasks:
       acurl https://lists.sr.ht/query/list/5261.mbox -o site/_libs/formbox/mbox
   - build: |
       cd site
-      julia --project=@. .build.jl
+      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