Merge pull request #293 from caorushizi/fix-list-style #183
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Downloader Docs. | |
on: | |
push: | |
branches: ["master"] | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
env: | |
BUCKET: downloader-docs | |
ENDPOINT: oss-cn-beijing.aliyuncs.com | |
ACCESS_KEY: LTAI5tLckcUrBtj7bCiUYwWz | |
ACCESS_KEY_SECRET: ${{ secrets.ACCESS_KEY_SECRET }} | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- uses: pnpm/action-setup@v3 | |
with: | |
version: latest | |
run_install: true | |
- name: Build with Vitepress | |
run: pnpm run docs:build | |
- 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 |