Update Vitepress config to remove unused files and dependencies #30
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 to Cloudflare Pages | |
on: | |
push: | |
branches: | |
- main # 当代码推送到 main 分支时触发 | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install pnpm | |
run: | | |
curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build project | |
run: pnpm run build | |
- name: Install Wrangler | |
run: pnpm add -g wrangler | |
- name: Publish to Cloudflare Pages | |
uses: cloudflare/pages-action@v1 | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
projectName: study-wiki | |
directory: docs/.vitepress/dist |