mirror of
https://github.com/go-task/task.git
synced 2024-12-14 10:52:43 +02:00
65 lines
1.5 KiB
YAML
65 lines
1.5 KiB
YAML
version: "3"
|
|
|
|
tasks:
|
|
yarn:install:
|
|
desc: Setup Docusaurus locally
|
|
cmds:
|
|
- yarn install
|
|
sources:
|
|
- package.json
|
|
- yarn.lock
|
|
|
|
default:
|
|
desc: Start website
|
|
deps: [yarn:install]
|
|
aliases: [s, start]
|
|
vars:
|
|
HOST: '{{default "0.0.0.0" .HOST}}'
|
|
PORT: '{{default "3001" .PORT}}'
|
|
cmds:
|
|
- npx docusaurus start --no-open --host={{.HOST}} --port={{.PORT}}
|
|
|
|
build:
|
|
desc: Build website
|
|
deps: [yarn:install]
|
|
cmds:
|
|
- npx docusaurus build
|
|
|
|
preview:
|
|
desc: Preview Website
|
|
deps: [build]
|
|
aliases: [serve]
|
|
vars:
|
|
HOST: '{{default "localhost" .HOST}}'
|
|
PORT: '{{default "3001" .PORT}}'
|
|
cmds:
|
|
- npx docusaurus serve --no-open --host={{.HOST}} --port={{.PORT}}
|
|
|
|
clean:
|
|
desc: Clean temp directories
|
|
cmds:
|
|
- rm -rf ./build
|
|
|
|
deploy:
|
|
desc: Build and deploy Docusaurus
|
|
summary: Requires GIT_USER and GIT_PASS envs to be previous set
|
|
cmds:
|
|
- npx docusaurus deploy
|
|
|
|
upgrade:
|
|
desc: Upgrade Docusaurus
|
|
cmds:
|
|
- yarn upgrade @docusaurus/core@latest @docusaurus/preset-classic@latest @docusaurus/module-type-aliases@latest @docusaurus/tsconfig@latest @docusaurus/types@latest
|
|
|
|
crowdin:push:
|
|
desc: Upload source files to a Crowdin project
|
|
deps: [yarn:install]
|
|
cmds:
|
|
- npx crowdin push
|
|
|
|
crowdin:pull:
|
|
desc: Download latest translations from Crowdin to the specified place
|
|
deps: [yarn:install]
|
|
cmds:
|
|
- npx crowdin pull --export-only-approved
|