Something went wrong. Try again.
The code behind dhawos.dev dhawos.dev
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970# yaml-language-server: $schema=https://taskfile.dev/schema.json
version: "3"
vars: SITE_ID: sh: echo "$NETLIFY_SITE_ID" NETLIFY_AUTH_TOKEN: sh: echo "$NETLIFY_AUTH_TOKEN" secret: true BRANCH_NAME: sh: git rev-parse --abbrev-ref HEAD
tasks: build: sources: - "static/**" - "**/*.go" - "**/*.svg" - "**/*.json" - "**/*.svg" - "**/*.md" - "**/*.templ" - "**/*.css" - exclude: internal/**/*_templ.go - exclude: internal/**/output.css - exclude: Readme.md cmds: - hugo
dev: cmds: - hugo server --disableFastRender
lint: cmds: - hugo --printPathWarnings --printI18nWarnings - markdownlint . - cspell
netlify: cmds: - hugo --baseURL http://localhost:8888/site - netlify dev --dir public
checks: cmds: - task: lint - task: build - lychee public --root-dir "$(pwd)/public"
deploy-preview: requires: vars: - SITE_ID - NETLIFY_AUTH_TOKEN - BRANCH_NAME cmds: - hugo --baseURL https://{{.BRANCH_NAME}}--dhawos-personal-site.netlify.app - netlify deploy --site {{.SITE_ID}} --auth {{.NETLIFY_AUTH_TOKEN}} --dir public --alias {{.BRANCH_NAME}}
deploy: requires: vars: - SITE_ID - NETLIFY_AUTH_TOKEN cmds: - task: build - netlify deploy --site {{.SITE_ID}} --auth {{.NETLIFY_AUTH_TOKEN}} --prod --dir "public"