improve build script
This commit is contained in:
parent
cae4fd5a24
commit
6a61b3eb42
8
build.sh
8
build.sh
|
@ -2,9 +2,11 @@
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
export DEPLOY_PRIME_URL=https://harald.hoyer.xyz
|
export DEPLOY_PRIME_URL=https://harald.hoyer.xyz
|
||||||
nix shell nixpkgs#zola -c zola build --force --output-dir /var/www/harald.hoyer.xyz/html
|
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 install
|
||||||
nix shell nixpkgs#nodejs_20 nixpkgs#zola -c npm run abridge
|
nix shell nixpkgs#nodejs_20 nixpkgs#zola -c npm run abridge
|
||||||
nix shell nixpkgs#zola -c zola build --force --output-dir /var/www/harald.hoyer.xyz/html
|
nix shell nixpkgs#zola -c zola build --base-url "$DEPLOY_PRIME_URL"
|
||||||
rsync -av public/ /var/www/harald.hoyer.xyz/html/
|
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/
|
chmod go-w -R /var/www/harald.hoyer.xyz/
|
||||||
|
|
Loading…
Reference in a new issue