blog/Justfile

27 lines
805 B
Makefile

OUT_DIR := "public"
@build:
zola build -o {{OUT_DIR}} --force
@deploy: build
#!/usr/bin/env bash
cd {{OUT_DIR}}
git init .
git checkout -B gh-pages
touch .nojekyll
# Create matrix homeserver files
# Remove it or change it to your server
mkdir -p .well-known/matrix/
echo '{"m.homeserver": {"base_url": "https://matrix.4rs.nl}}' > .well-known/matrix/client
echo '{"m.server": "matrix.4rs.nl:443"}' > .well-known/matrix/server
git add .
git commit -m "Deploy blog to github pages"
git remote add origin $(git --git-dir ../.git remote get-url github)
git push origin gh-pages -f
cd ..
rm -fr {{OUT_DIR}}
@install-tools:
echo "Run: `curl -s -L https://github.com/getzola/zola/releases/download/v0.18.0/zola-v0.18.0-x86_64-unknown-linux-gnu.tar.gz | sudo tar xvzf - -C /usr/local/bin`"