Skip to content

Update Vitepress config and package.json #27

Update Vitepress config and package.json

Update Vitepress config and package.json #27

Workflow file for this run

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 dependencies
run: npm install
- name: Build project
run: npm run docs:build
- name: Install Wrangler
run: npm install -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