Steps
Create Blazor Webassembly Project using cli or using Visual Studio CLI Source Link
Create .github Folder
Inside .github Folder create another Folder workflows
Inside workflows create file dotnet.yaml
Code below for above process
|
|
- Open The created yaml File And Paste The Below Code
|
|
Change in above Code Based On Project
On Line number 16 Change Dotnet version appropriate to you project Version
On Line Number 19 Change BlazorGitHubPagesDemo.csproj to your project name .csproj
on Line Number 23 Change BlazorGitHubPagesDemo to your github repository name
in rest place you can change based on requirement
Now Push to Github
After Pushing to Github
Go to Project Repository Setting
Then Action Tab
Select Read and write permissions
Then Click On Save.
Click On Action Tab
In action tab if any job is failed the Click on that job
After that Go To Page Tab
- Make Sure Source is Deploy from From a branch is selected
- In Branch section select gh-pages
Wait For Few Moment github page will be live.
Few thing to Consider
- Make sure branch name is matches i.e if Your Current repository branch is “master” then line no 4 should have same name
|
|
If you application require WasmBuildNative then include below code after line dotnet-version: 6.0.x in original Code
- Case are when you are using Some Library like SkiaSharp , SqliteWasmHelper Etc.
- Take Like Example Of Challenge Repository
|
|
Live Fast Video Demo of Creating project using code in this webpage