2025-08-12 18:09:19 +02:00
|
|
|
version: '3'
|
2019-01-02 13:42:06 -02:00
|
|
|
|
|
|
|
|
tasks:
|
2025-08-12 18:09:19 +02:00
|
|
|
install:
|
|
|
|
|
desc: Setup VitePress locally
|
2026-08-17 14:15:03 +02:00
|
|
|
# start:all reaches this task through two parallel branches, and pnpm does
|
|
|
|
|
# not expect two installs at once.
|
|
|
|
|
run: once
|
2019-01-02 13:42:06 -02:00
|
|
|
cmds:
|
2025-08-12 18:09:19 +02:00
|
|
|
- pnpm install
|
2022-11-12 09:26:35 -03:00
|
|
|
sources:
|
|
|
|
|
- package.json
|
2025-08-12 18:09:19 +02:00
|
|
|
- pnpm-lock.yaml
|
2019-01-02 13:42:06 -02:00
|
|
|
|
2022-11-02 11:39:05 -03:00
|
|
|
default:
|
2022-05-29 14:15:01 -03:00
|
|
|
desc: Start website
|
2025-08-12 18:09:19 +02:00
|
|
|
deps: [install]
|
2026-08-17 14:15:03 +02:00
|
|
|
aliases: [s, start, start:next]
|
2022-06-11 19:16:11 -03:00
|
|
|
vars:
|
2023-04-27 00:57:58 +01:00
|
|
|
HOST: '{{default "0.0.0.0" .HOST}}'
|
2022-06-11 19:16:11 -03:00
|
|
|
PORT: '{{default "3001" .PORT}}'
|
2026-08-17 14:15:03 +02:00
|
|
|
env:
|
|
|
|
|
DOCS_CHANNEL: '{{.CHANNEL | default "next"}}'
|
|
|
|
|
# Only the dev server sets this: it is what keeps the localhost URLs of
|
|
|
|
|
# the version selector out of a build. See .vitepress/config.ts.
|
|
|
|
|
DOCS_LOCAL: '1'
|
2019-01-02 13:42:06 -02:00
|
|
|
cmds:
|
2025-08-12 18:09:19 +02:00
|
|
|
- pnpm dev --host={{.HOST}} --port={{.PORT}}
|
|
|
|
|
|
2026-08-17 14:15:03 +02:00
|
|
|
# The port is half of a pair: config.ts links the two channels to each other
|
|
|
|
|
# on 3001 and 3002, so both dev servers can run side by side.
|
|
|
|
|
start:latest:
|
|
|
|
|
desc: Start website with the content of the released version
|
|
|
|
|
cmds:
|
|
|
|
|
- task: default
|
|
|
|
|
vars: { CHANNEL: latest, PORT: '{{default "3002" .PORT}}' }
|
|
|
|
|
|
|
|
|
|
start:all:
|
|
|
|
|
desc: Start both channels side by side
|
|
|
|
|
deps: [default, start:latest]
|
|
|
|
|
|
2025-08-12 18:09:19 +02:00
|
|
|
lint:
|
|
|
|
|
desc: Lint website
|
|
|
|
|
deps: [install]
|
|
|
|
|
cmds:
|
|
|
|
|
- pnpm lint
|
2020-12-27 18:55:55 -03:00
|
|
|
|
2022-05-29 14:15:01 -03:00
|
|
|
build:
|
|
|
|
|
desc: Build website
|
2026-08-17 14:15:03 +02:00
|
|
|
aliases: [build:next]
|
2025-08-12 18:09:19 +02:00
|
|
|
deps: [install]
|
2026-08-17 14:15:03 +02:00
|
|
|
env:
|
|
|
|
|
DOCS_CHANNEL: '{{.CHANNEL | default "next"}}'
|
2020-12-27 18:55:55 -03:00
|
|
|
cmds:
|
2025-08-12 18:09:19 +02:00
|
|
|
- pnpm build
|
2022-05-29 14:15:01 -03:00
|
|
|
|
2026-08-17 14:15:03 +02:00
|
|
|
build:latest:
|
|
|
|
|
desc: Build website with the content of the released version
|
|
|
|
|
cmds:
|
|
|
|
|
- task: build
|
|
|
|
|
vars: { CHANNEL: latest }
|
|
|
|
|
|
2023-03-16 21:09:50 +08:00
|
|
|
preview:
|
|
|
|
|
desc: Preview Website
|
|
|
|
|
deps: [build]
|
2023-03-20 22:33:24 -03:00
|
|
|
aliases: [serve]
|
|
|
|
|
vars:
|
|
|
|
|
HOST: '{{default "localhost" .HOST}}'
|
|
|
|
|
PORT: '{{default "3001" .PORT}}'
|
2023-03-16 21:09:50 +08:00
|
|
|
cmds:
|
2025-08-23 23:37:06 +09:00
|
|
|
- pnpm preview --host={{.HOST}} --port={{.PORT}}
|
2023-03-16 21:09:50 +08:00
|
|
|
|
2022-05-29 14:15:01 -03:00
|
|
|
clean:
|
|
|
|
|
desc: Clean temp directories
|
|
|
|
|
cmds:
|
2025-08-12 18:09:19 +02:00
|
|
|
- rm -rf ./vitepress/dist
|
2022-05-29 14:15:01 -03:00
|
|
|
|
2026-08-17 14:15:03 +02:00
|
|
|
# --no-build is what makes the channel stick: the CLI builds by default, and
|
|
|
|
|
# that build would come from netlify.toml, which knows nothing about the
|
|
|
|
|
# channel these tasks just built.
|
2025-08-12 18:09:19 +02:00
|
|
|
deploy:next:
|
|
|
|
|
desc: Build and deploy next.taskfile.dev
|
2026-08-17 14:15:03 +02:00
|
|
|
deps: [build:next]
|
2022-05-29 14:15:01 -03:00
|
|
|
cmds:
|
2026-08-17 14:15:03 +02:00
|
|
|
- pnpm netlify deploy --prod --no-build --site=4e13dfcf-fc0d-4bec-ad60-b918a8dc3942
|
2022-12-17 11:43:43 -03:00
|
|
|
|
2025-08-12 18:09:19 +02:00
|
|
|
deploy:prod:
|
|
|
|
|
desc: Build and deploy taskfile.dev
|
2026-08-17 14:15:03 +02:00
|
|
|
deps: [build:latest]
|
2022-12-17 11:43:43 -03:00
|
|
|
cmds:
|
2026-08-17 14:15:03 +02:00
|
|
|
- pnpm netlify deploy --prod --no-build --site=e625bc6a-1cd3-465d-ad30-7bbddaeb4f31
|