From d38886483da2fc9320ac09ef258f2ce0f5c6b3c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A3=AB=E5=AD=90=E2=98=80=EF=B8=8F?= <84996057@qq.com> Date: Thu, 2 May 2024 18:30:24 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=F0=9F=8E=A1=20=20modify=20github=20actio?= =?UTF-8?q?ns?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 15 --------------- .github/workflows/docs.yml | 23 +++++++++++++---------- 2 files changed, 13 insertions(+), 25 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f234d392..4c460157 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,8 +30,6 @@ jobs: # step1: check out repository - name: Check out git repository uses: actions/checkout@v4 - with: - submodules: true # step2: install node env - name: Install Node.js @@ -39,19 +37,6 @@ jobs: with: node-version: 20 - # step3: install go env - - name: Install Go - uses: actions/setup-go@v4 - with: - go-version: "1.21.5" - cache-dependency-path: "internal/go.sum" - - # step4: install python env - - name: Install Python - uses: actions/setup-python@v5 - with: - python-version: "3.10" - # step5: install pnpm env - uses: pnpm/action-setup@v3 with: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 74fd83cb..c90e2a9f 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -16,7 +16,6 @@ concurrency: cancel-in-progress: false env: - BUILD_PATH: "." BUCKET: downloader-docs ENDPOINT: oss-cn-beijing.aliyuncs.com ACCESS_KEY: LTAI5tLckcUrBtj7bCiUYwWz @@ -28,22 +27,26 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 + - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 + with: + node-version: 20 + + - uses: pnpm/action-setup@v3 with: - node-version: "16" - - name: Install PNPM - run: npm i -g pnpm - - name: Install dependencies - run: pnpm install - working-directory: ${{ env.BUILD_PATH }} + version: latest + run_install: true + - name: Build with Vitepress run: pnpm run docs:build - working-directory: ${{ env.BUILD_PATH }} + - name: Install Alibaba Cloud OSSUTIL run: wget http://gosspublic.alicdn.com/ossutil/1.6.10/ossutil64 && chmod +x ossutil64 + - name: Configure Alibaba Cloud OSSUTIL run: ./ossutil64 config -i ${ACCESS_KEY} -k ${ACCESS_KEY_SECRET} -e ${ENDPOINT} -c .ossutilconfig + - name: Upload the web folder to the chosen OSS bucket run: ./ossutil64 --config-file .ossutilconfig cp ${{ github.workspace }}/docs/.vitepress/dist oss://${BUCKET} -r -f