Merge branch 'main' of https://github.com/AB-aboutTrans/aboutTrans #423
This file contains hidden or 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 VitePress site to Cloudflare Pages | |
| on: | |
| push: | |
| branches: | |
| - 'main' | |
| paths: | |
| - 'docs/**' | |
| - '.github/workflows/deploy.yml' | |
| - 'package.json' | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 检出代码 | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: 安装依赖 | |
| run: npm install | |
| - name: 构建项目 | |
| run: npm run docs:build | |
| - name: Install Wrangler | |
| run: npm install -g wrangler@4.16.1 | |
| - name: Deploy to Cloudflare Pages | |
| id: deploy | |
| uses: cloudflare/wrangler-action@v3 | |
| with: | |
| apiToken: ${{ secrets.CLOUDFLARE_PAGES_TOKEN }} | |
| accountId: ${{ secrets.CLOUDFLARE_PAGES_ACCOUNT }} | |
| command: pages deploy docs/.vitepress/dist --project-name=ab |