Files
blog/.gitea/workflows/deploy.yml
bluish 0642d15819
Some checks failed
Deploy to Cloudflare Workers / deploy (push) Failing after 2m10s
自动化部署
2026-01-07 16:57:51 +00:00

36 lines
822 B
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name: Deploy to Cloudflare Workers
on:
push:
branches:
- main # 当推送到 main 分支时触发
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20' # 使用 Node.js 20你可以根据需要调整版本
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.14.4 # 使用 package.json 中指定的 pnpm 版本
- name: Install dependencies
run: pnpm install
- name: Build project
run: npx astro build
- name: Deploy to Cloudflare Workers
run: npx wrangler deploy
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}