diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 4cdbbf8e68..ae0fe6c289 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -30,14 +30,10 @@ jobs: - uses: jdx/mise-action@v2 with: install_args: bun - working_directory: docs - - run: bun install - working-directory: docs - - run: bun run docs:build - working-directory: docs + cache: false + - run: mise run docs:build - if: github.event_name == 'push' && github.ref == 'refs/heads/main' - run: mise run release-docs - working-directory: docs + run: mise run docs:release env: AWS_ACCESS_KEY_ID: ${{ secrets.CLOUDFLARE_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.CLOUDFLARE_SECRET_ACCESS_KEY }} diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 01bf2ce653..f4e888df11 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -188,8 +188,8 @@ export default defineConfig({ [ "script", { - data: { goatcounter: "https://jdx.goatcounter.com/count" }, - async: true, + "data-goatcounter": "https://jdx.goatcounter.com/count", + async: "", src: "//gc.zgo.at/count.js", }, ], diff --git a/tasks.md b/tasks.md index 154982ebe8..78592a0ea9 100644 --- a/tasks.md +++ b/tasks.md @@ -47,8 +47,26 @@ run a command inside of development docker container ## `docs` +- Depends: docs:setup + - **Usage**: `docs` +## `docs:build` + +- Depends: docs:setup + +- **Usage**: `docs:build` + +## `docs:release` + +- Depends: docs:build + +- **Usage**: `docs:release` + +## `docs:setup` + +- **Usage**: `docs:setup` + ## `filetask` - **Usage**: `filetask [-f --force] [-u --user ] ` @@ -141,10 +159,6 @@ User to run as - **Usage**: `release` -## `release-docs` - -- **Usage**: `release-docs` - ## `release-plz` - **Usage**: `release-plz` diff --git a/tasks.toml b/tasks.toml index 715ec14603..7d31cb5e6d 100644 --- a/tasks.toml +++ b/tasks.toml @@ -12,8 +12,18 @@ run = "cargo build --all-features" #outputs = ["target/debug/mise"] [docs] +depends = ["docs:setup"] dir = "docs" -run = "npm run docs:dev" +run = "bun run docs:dev" + +["docs:setup"] +dir = "docs" +run = "bun i" + +["docs:build"] +depends = ["docs:setup"] +dir = "docs" +run = "bun run docs:build" ["render:usage"] depends = ["build"] diff --git a/tasks/release-docs b/tasks/docs/release similarity index 94% rename from tasks/release-docs rename to tasks/docs/release index c45ac9fb91..8b43853c30 100755 --- a/tasks/release-docs +++ b/tasks/docs/release @@ -1,12 +1,11 @@ #!/usr/bin/env bash set -xeuo pipefail +#MISE depends=["docs:build"] #MISE dir="docs" export AWS_REGION=auto export AWS_ENDPOINT_URL=https://6e243906ff257b965bcae8025c2fc344.r2.cloudflarestorage.com -bun run docs:build - if [ $((RANDOM % 30)) -eq 0 ]; then # delete old assets only roughly 1/30 times # deleting old assets can break the site for people currently on it