Skip to content

Commit 5a59139

Browse files
committed
✨ 添加 Vercel 部署步骤
1 parent 06c7a32 commit 5a59139

3 files changed

Lines changed: 35 additions & 6 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Deploy to NuxtHub
2+
on: push
3+
4+
jobs:
5+
deploy:
6+
name: 'Deploy to NuxtHub'
7+
runs-on: ubuntu-latest
8+
environment:
9+
name: ${{ github.ref == 'refs/heads/main' && 'production' || 'preview' }}
10+
url: ${{ steps.deploy.outputs.deployment-url }}
11+
permissions:
12+
contents: read
13+
id-token: write
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Deploy to Vercel
22+
uses: ngduc/vercel-deploy-action@master
23+
with:
24+
vercel-cli: vercel
25+
vercel-token: ${{ secrets.VERCEL_TOKEN }}
26+
vercel-org-id: ${{ secrets.ORG_ID}}
27+
vercel-project-id: ${{ secrets.PROJECT_ID}}
28+
vercel-args: '--prod'

.github/workflows/Deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ jobs:
3535
NUXT_PUBLIC_COMMIT_HASH: ${{ github.sha }}
3636
run: pnpm build
3737

38-
- name: Publish
38+
- name: Deploy to Cloudflare Pages
3939
uses: cloudflare/pages-action@v1
4040
with:
4141
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
4242
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
4343
projectName: mine-showcase
44-
directory: dist
44+
directory: dist

tsconfig.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
22
"extends": "./.nuxt/tsconfig.json",
3-
"compilerOptions": {
4-
"plugins": [{ "name": "typescript-plugin-toml" }]
5-
},
6-
"module": "esnext",
3+
"target": "ES2020",
4+
"moduleResolution": "Bundler",
5+
"verbatimModuleSyntax": true,
6+
"moduleDetection": "force",
7+
"compilerOptions": {},
78
"strict": true
89
}

0 commit comments

Comments
 (0)