aboutsummaryrefslogtreecommitdiffhomepage
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
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.
-rw-r--r--.build.yml23
-rw-r--r--README.md4
2 files changed, 15 insertions, 12 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
diff --git a/README.md b/README.md
index 8b1e14b..fcb980e 100644
--- a/README.md
+++ b/README.md
@@ -12,7 +12,8 @@ The following are needed to run the command above:
* [Julia](https://julialang.org)
* [KaTeX](https://katex.org)
-* [pip](https://pip.pypa.io)
+* [openring](https://sr.ht/~sircmpwn/openring)
+* [css-html-js-minify](https://pypi.org/p/css-html-js-minify)
KaTex has to installed to `_css` and `_libs` similar
to what done in `.build.yml`. Live-rendering will additionally
@@ -26,7 +27,6 @@ plus their own dependencies:
* [Franklin](https://franklinjl.org)
* [NodeJS](https://juliapackages.com/p/nodejs)
* [highlight.js](https://highlightjs.org)
-* [css-html-js-minify](https://pypi.org/p/css-html-js-minify)
## Copying