---
version: 3
# env:
vars:
BENCHTIME: 4s
tasks:
default:
deps: [all]
cleanbuild:
deps: [clean, full]
quarto:
desc: "compile quarto files"
dir: "content"
cmds:
- quarto render *.qmd --output-dir ./output --to html
noteindex:
desc: "generate note dir index"
cmds:
- "python bin/genindex.py ./content/note/ ./content/note/"
pipremote:
desc: "Update Pip environment on remote server"
cmds:
- ssh [email protected] 'cd ~/btbytes/; ./venv/bin/pip install -r requirements.txt'
all:
desc: "Only build the changes"
cmds:
- python sitebuild
full:
desc: "Do a full build"
cmds:
- python sitebuild --full
remote:
desc: "Sync changes to remote"
cmds:
- "/usr/bin/rsync -avz -d --delete-after -e ssh ./output/ [email protected]:/data/web/www.btbytes.com/www/"
clean:
desc: "Delete the old build"
cmds:
- rm -rf output
push:
desc: "push the site after committing all (usage: task push -- 'Your commit message')"
cmds:
- git add .
- |
if [ -n "{{.CLI_ARGS}}" ]; then
git commit -am "{{.CLI_ARGS}}"
else
git commit -am "adding more changes"
fi
- git push origin master