1
0
Fork 0
blog/build.sh

13 lines
653 B
Bash
Executable file

#!/usr/bin/env bash
set -ex
export DEPLOY_PRIME_URL=https://harald.hoyer.xyz
rm -fr public
nix shell nixpkgs#zola -c zola build --base-url "$DEPLOY_PRIME_URL"
nix shell nixpkgs#nodejs_20 nixpkgs#zola -c npm install
nix shell nixpkgs#nodejs_20 nixpkgs#zola -c npm run abridge
nix shell nixpkgs#zola -c zola build --base-url "$DEPLOY_PRIME_URL"
nix shell nixpkgs#brotli -c find public -type f -regextype posix-extended -regex '.*\.(htm|html|css|js|xml|xsl|txt|woff|woff2|svg|otf|eot|ttf)' -exec gzip --best -k -f {} \+ -exec brotli --best -f {} \;
rsync -a --delete-after public/ /var/www/harald.hoyer.xyz/html/
chmod go-w -R /var/www/harald.hoyer.xyz/