Skip to content

Commit 52ce177

Browse files
committed
新增 Deno Deploy 平台部署支持
1 parent bbc43e1 commit 52ce177

74 files changed

Lines changed: 80257 additions & 166 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,5 @@ example.dev.vars
6666
netlify.toml
6767
README*.md
6868
vercel.json
69-
wrangler*.toml
69+
wrangler*.toml
70+
deno.json

.edgeoneignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,4 @@ netlify.toml
6464
vercel.json
6565
README*.md
6666
wrangler*.toml
67+
deno.json

.github/workflows/deno.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Deploy to Deno Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
jobs:
10+
deno-deploy:
11+
runs-on: ubuntu-latest
12+
name: "Deploy to Deno Deploy"
13+
permissions:
14+
contents: read
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
22+
with:
23+
node-version: 24
24+
25+
- name: Check Required Secrets
26+
run: |
27+
REQUIRED=(DENO_DEPLOY_TOKEN DENO_PROJECT DENO_ORG)
28+
for var in "${REQUIRED[@]}"; do
29+
if [ -z "${!var}" ]; then
30+
echo "❌ Error: $var is missing."
31+
exit 1
32+
fi
33+
done
34+
env:
35+
DENO_DEPLOY_TOKEN: ${{ secrets.DENO_DEPLOY_TOKEN }}
36+
DENO_PROJECT: ${{ secrets.DENO_PROJECT }}
37+
DENO_ORG: ${{ secrets.DENO_ORG }}
38+
39+
- name: Inject Commit Hash & Platform
40+
run: node scripts/inject_vars.js --platform=deno
41+
42+
- name: Update Deno Configuration
43+
run: node scripts/update_deno.js
44+
env:
45+
DENO_PROJECT: ${{ secrets.DENO_PROJECT }}
46+
DENO_ORG: ${{ secrets.DENO_ORG }}
47+
48+
- name: Setup Deno
49+
uses: denoland/setup-deno@v2
50+
with:
51+
deno-version: v2.x
52+
53+
- name: Install dependencies
54+
run: npm install --omit=dev
55+
56+
- name: Deploy to Deno Deploy
57+
run: deno deploy --prod --org ${{ secrets.DENO_ORG }} --app ${{ secrets.DENO_PROJECT }}
58+
env:
59+
DENO_DEPLOY_TOKEN: ${{ secrets.DENO_DEPLOY_TOKEN }}
60+
61+
- name: Success Notification
62+
run: echo "🚀 NodeAuth deployed successfully to Deno Deploy!"

.netlifyignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,5 @@ Dockerfile
6565
example.dev.vars
6666
vercel.json
6767
README*.md
68-
wrangler*.toml
68+
wrangler*.toml
69+
deno.json

.vercelignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,5 @@ Dockerfile
6363
example.dev.vars
6464
netlify.toml
6565
README*.md
66-
wrangler*.toml
66+
wrangler*.toml
67+
deno.json

.wranglerignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ cloud-functions/
33
backend/dist/docker/
44
backend/dist/netlify/
55
backend/dist/vercel/
6-
backend/dist/edgeone/
6+
backend/dist/edgeone/
7+
backend/dist/deno/

0 commit comments

Comments
 (0)