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