Repository navigation
docs: 主题开发页精简,旧版 hub 的差异集中到一张表 (#40) #73
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 | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| # A second push during a deploy supersedes it rather than queueing. | |
| concurrency: | |
| group: deploy | |
| cancel-in-progress: true | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| # Page dates come from git log; a shallow clone carries no history. | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run build | |
| # Direct upload rather than the Pages Git integration: the token below is | |
| # scoped to Pages alone, and the build that ships is the one this workflow | |
| # produced. | |
| - run: npx wrangler@4 pages deploy dist --project-name monitor-document --branch main | |
| env: | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} |