feat: add Taskfile and Lefthook to project

This commit is contained in:
Yorick Barbanneau 2024-06-05 23:26:49 +02:00
parent 214a34bede
commit 75baf9efb4
3 changed files with 16 additions and 2 deletions

1
.gitignore vendored
View file

@ -3,3 +3,4 @@ cache
__pycache__
.direnv
plugins
.env

View file

@ -55,6 +55,7 @@
python3Packages.typogrify
python3Packages.livereload
python3Packages.invoke
rsync
];
shellHook = ''
mkdir -p plugins

View file

@ -1,11 +1,23 @@
version: "3"
set: [errexit, pipefail, nounset]
shopt: [globstar]
tasks:
dotenv:
- .env
vars:
OUTPUT_PATH: ./output
DEPLOY_CMD: rsync
DEPLOY_ARGS: -avz --delete
tasks:
build:
cmds:
- pelican -o ./output
- pelican -o {{.OUTPUT_PATH}}
serve:
cmds:
- invoke livereload
deploy:
deps:
- build
cmds:
- |
{{.DEPLOY_CMD}} {{.DEPLOY_ARGS}} {{.OUTPUT_PATH}} {{.HOSTNAME}}:{{.WWW_PATH}}