2023-03-16 21:09:50 +08:00
|
|
|
version: "3"
|
2019-01-02 13:42:06 -02:00
|
|
|
|
|
|
|
tasks:
|
2022-11-12 09:26:35 -03:00
|
|
|
yarn:install:
|
2022-05-29 14:15:01 -03:00
|
|
|
desc: Setup Docusaurus locally
|
2019-01-02 13:42:06 -02:00
|
|
|
cmds:
|
2022-05-29 14:15:01 -03:00
|
|
|
- yarn install
|
2022-11-12 09:26:35 -03:00
|
|
|
sources:
|
|
|
|
- package.json
|
|
|
|
- yarn.lock
|
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
|
2022-11-12 09:26:35 -03:00
|
|
|
deps: [yarn:install]
|
2022-11-02 11:39:05 -03:00
|
|
|
aliases: [s, start]
|
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}}'
|
2019-01-02 13:42:06 -02:00
|
|
|
cmds:
|
2022-09-04 17:38:29 -03:00
|
|
|
- npx docusaurus start --no-open --host={{.HOST}} --port={{.PORT}}
|
2020-12-27 18:55:55 -03:00
|
|
|
|
2022-05-29 14:15:01 -03:00
|
|
|
build:
|
|
|
|
desc: Build website
|
2022-11-12 09:26:35 -03:00
|
|
|
deps: [yarn:install]
|
2020-12-27 18:55:55 -03:00
|
|
|
cmds:
|
2022-05-29 14:15:01 -03:00
|
|
|
- npx docusaurus build
|
|
|
|
|
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:
|
2023-03-20 22:33:24 -03:00
|
|
|
- npx docusaurus serve --no-open --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:
|
|
|
|
- rm -rf ./build
|
|
|
|
|
|
|
|
deploy:
|
2022-10-14 19:28:27 -03:00
|
|
|
desc: Build and deploy Docusaurus
|
|
|
|
summary: Requires GIT_USER and GIT_PASS envs to be previous set
|
2022-05-29 14:15:01 -03:00
|
|
|
cmds:
|
|
|
|
- npx docusaurus deploy
|
2022-12-17 11:43:43 -03:00
|
|
|
|
|
|
|
upgrade:
|
|
|
|
desc: Upgrade Docusaurus
|
|
|
|
cmds:
|
2023-03-16 21:09:50 +08:00
|
|
|
- yarn upgrade @docusaurus/core@latest @docusaurus/preset-classic@latest @docusaurus/module-type-aliases@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
|