Yuyuqt commited on
Commit
c235f65
·
1 Parent(s): d8742b2

add: deploy.yml

Browse files
Files changed (1) hide show
  1. .github/workflows/deploy.yml +28 -0
.github/workflows/deploy.yml ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Deploy Blazor WASM to Vercel
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ] # Or master, check your branch name
6
+
7
+ jobs:
8
+ build-and-deploy:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: actions/checkout@v3
12
+
13
+ - name: Setup .NET
14
+ uses: actions/setup-dotnet@v3
15
+ with:
16
+ dotnet-version: '8.0.x' # Use your project's .NET version
17
+
18
+ - name: Publish Project
19
+ run: dotnet publish BlazorWebAssembly/BlazorWebAssembly.csproj -c Release -o release
20
+
21
+ - name: Deploy to Vercel
22
+ uses: amondnet/vercel-action@v20
23
+ with:
24
+ vercel-token: ${{ secrets.VERCEL_TOKEN }}
25
+ vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
26
+ vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
27
+ working-directory: ./release/wwwroot
28
+ vercel-args: '--prod'