fix: handle MIME decoding and deploy workflow
This commit is contained in:
1 parent
f031612996
commit
207cd0c789
10 files changed
+204
-77
No files matched your search
+18
-18
@@ -10,38 +10,38 @@ jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
contents: read
|
||||
name: Deploy Auth Inbox Worker
|
||||
steps:
|
||||
# 步骤 1: 检出代码
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# 步骤 2: 设置 Node.js 环境
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20' # 根据您的项目需求选择 Node.js 版本
|
||||
node-version: '20'
|
||||
cache: 'pnpm'
|
||||
|
||||
# 步骤 3: 安装依赖项
|
||||
- name: Install Dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Install Web Dependencies
|
||||
run: npm --prefix web install
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Build Web App
|
||||
run: npm run build:web
|
||||
run: pnpm run build:web
|
||||
|
||||
# 步骤 4: 部署 Worker
|
||||
- name: Deploy Backend for ${{ github.ref_name }}
|
||||
- name: Apply D1 Migrations
|
||||
run: |
|
||||
|
||||
# Write secrets.TOML to wrangler.toml file
|
||||
echo '${{ secrets.TOML }}' > wrangler.toml
|
||||
|
||||
# Deploy the worker using Wrangler
|
||||
npx wrangler deploy
|
||||
echo '${{ secrets.TOML }}' > wrangler.toml
|
||||
pnpm run db:migrate:remote
|
||||
env:
|
||||
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
|
||||
- name: Deploy Backend for ${{ github.ref_name }}
|
||||
run: |
|
||||
pnpm exec wrangler deploy
|
||||
env:
|
||||
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
Reference in new issue
Block a user