From 54f648be59c605da6ddc1a2817ae88041e50259e Mon Sep 17 00:00:00 2001 From: Tenny Date: Tue, 18 Jun 2024 12:39:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/doc-deploy.yml | 55 ------------------- .github/workflows/release-please.yml | 48 +++++++++------- docs/.vitepress/theme/index.ts | 4 +- style/{form_item => form-item}/index.css | 0 style/{form_item => form-item}/index.js | 0 .../index.css | 0 .../{image_preview => image-preview}/index.js | 0 7 files changed, 30 insertions(+), 77 deletions(-) delete mode 100644 .github/workflows/doc-deploy.yml rename style/{form_item => form-item}/index.css (100%) rename style/{form_item => form-item}/index.js (100%) rename style/{image_preview => image-preview}/index.css (100%) rename style/{image_preview => image-preview}/index.js (100%) diff --git a/.github/workflows/doc-deploy.yml b/.github/workflows/doc-deploy.yml deleted file mode 100644 index b6180261..00000000 --- a/.github/workflows/doc-deploy.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: doc-deploy - -on: - push: - branches: [main] - - # 允许你从 Actions 选项卡手动运行此工作流程 - workflow_dispatch: - -# 只允许同时进行一次部署,跳过正在运行和最新队列之间的运行队列 -# 但是,不要取消正在进行的运行,因为我们希望允许这些生产部署完成 -concurrency: - group: pages - cancel-in-progress: false - -jobs: - deploy: - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [21] - - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Cache Node Modules - id: cache-node-modules - uses: actions/cache@v4 - with: - path: node_modules - key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-node- - - - name: Setup Pnpm - id: setup-pnpm - uses: pnpm/action-setup@v3 - - - name: Install Dependencies - if: steps.cache-node-modules.outputs.cache-hit != 'true' - run: pnpm install - - - name: Build Site - run: pnpm docs:build - - - name: Deploy Site - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./docs/.vitepress/dist - deploy_key: ${{ secrets.DEPLOY_KEY }} diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 6cdf3ce8..bf709e61 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -1,7 +1,17 @@ on: push: branches: - - main + - publish + + # 允许你从 Actions 选项卡手动运行此工作流程 + workflow_dispatch: + + +# 只允许同时进行一次部署,跳过正在运行和最新队列之间的运行队列 +# 但是,不要取消正在进行的运行,因为我们希望允许这些生产部署完成 +concurrency: + group: pages + cancel-in-progress: false permissions: contents: write @@ -12,8 +22,6 @@ name: release-please jobs: release: runs-on: ubuntu-latest - outputs: - release_created: ${{ steps.output-release-created.outputs.release_created }} steps: - uses: googleapis/release-please-action@v4 id: release @@ -26,21 +34,18 @@ jobs: # this is a built-in strategy in release-please, see "Action Inputs" # for more options release-type: node + deploy-doc: + runs-on: ubuntu-latest - - name: Output Release Created - id: output-release-created - run: | - release_created=${{ steps.release.outputs.release_created }} - echo "release_created=$release_created" >> "$GITHUB_OUTPUT" + strategy: + matrix: + node-version: [21] - publish: - runs-on: ubuntu-latest - needs: release - if: ${{ needs.release.outputs.release_created }} steps: - - name: Checkout Repository uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Cache Node Modules id: cache-node-modules @@ -52,16 +57,19 @@ jobs: ${{ runner.os }}-node- - name: Setup Pnpm + id: setup-pnpm uses: pnpm/action-setup@v3 - name: Install Dependencies - if: ${{ steps.cache-node-modules.outputs.cache-hit != 'true' }} + if: steps.cache-node-modules.outputs.cache-hit != 'true' run: pnpm install - - name: Build Lib - run: pnpm lib:build + - name: Build Site + run: pnpm docs:build - - name: Publish - run: npm publish - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Deploy Site + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs/.vitepress/dist + deploy_key: ${{ secrets.DEPLOY_KEY }} diff --git a/docs/.vitepress/theme/index.ts b/docs/.vitepress/theme/index.ts index 9a5e3f46..eb0a9c4e 100644 --- a/docs/.vitepress/theme/index.ts +++ b/docs/.vitepress/theme/index.ts @@ -14,14 +14,14 @@ import '../../../style/input'; import '../../../style/card'; import '../../../style/input'; import '../../../style/image'; -import '../../../style/image_preview'; +import '../../../style/image-preview'; import CodePreview from '../../../src/app_components/CodePreview.vue'; import '../../../style/message'; import '../../../style/shadow'; import '../../../style/table'; import '../../../style/switch'; import '../../../style/form'; -import '../../../style/form_item'; +import '../../../style/form-item'; export default { extends: DefaultTheme, diff --git a/style/form_item/index.css b/style/form-item/index.css similarity index 100% rename from style/form_item/index.css rename to style/form-item/index.css diff --git a/style/form_item/index.js b/style/form-item/index.js similarity index 100% rename from style/form_item/index.js rename to style/form-item/index.js diff --git a/style/image_preview/index.css b/style/image-preview/index.css similarity index 100% rename from style/image_preview/index.css rename to style/image-preview/index.css diff --git a/style/image_preview/index.js b/style/image-preview/index.js similarity index 100% rename from style/image_preview/index.js rename to style/image-preview/index.js