From 1b01aedf35c691ce85b7f955577851cd09023019 Mon Sep 17 00:00:00 2001 From: DanSnow Date: Sun, 2 Jun 2024 12:06:02 +0800 Subject: [PATCH] chore: fix doc build --- .github/workflows/doc.yml | 2 ++ packages/docs/moon.yml | 49 ++++++++++++++++++++++++++------------- 2 files changed, 35 insertions(+), 16 deletions(-) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index b7c6ae601..10e05483c 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -17,6 +17,8 @@ jobs: node-version: 20 - uses: actions4git/setup-git@v1 - uses: moonrepo/setup-toolchain@v0 + - run: | + git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY - name: Build and publish document run: moon run docs:publish env: diff --git a/packages/docs/moon.yml b/packages/docs/moon.yml index ecb54ff3b..6d8f12248 100644 --- a/packages/docs/moon.yml +++ b/packages/docs/moon.yml @@ -8,44 +8,61 @@ dependsOn: tasks: dev: command: - - nuxt - - dev + - nuxt + - dev deps: - ^:build local: true generate: command: - - nuxt - - generate + - nuxt + - generate + deps: + - ^:build + inputs: + - content/** + - components/** + - layouts/** + - public/** + - app.config.ts + - app.vue + - nuxt.config.ts + - tokens.config.ts check-200-html: command: - - test - - -f - - .output/public/200.html + - test + - -f + - .output/public/200.html deps: - ~:generate + inputs: + - .output/public/200.html platform: system check-nuxt-dir: command: - - test - - -d - - .output/public/_nuxt + - test + - -d + - .output/public/_nuxt deps: - ~:generate + inputs: + - .output/public/_nuxt platform: system generate-with-nojekyll: command: - - touch - - .output/public/.nojekyll + - touch + - .output/public/.nojekyll deps: - ~:check-200-html - ~:check-nuxt-dir + outputs: + - .output/public/.nojekyll platform: system publish: command: - - gh-pages - - -d - - .output/public - - -t + - gh-pages + - -d + - .output/public + - -t deps: - ~:generate-with-nojekyll