Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x
dotnet-version: 9.0.x
- name: Publish with dotnet
run: dotnet publish ./src --configuration Release --output build
- name: Deploy to Github Pages
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![](../../workflows/gh-pages/badge.svg)](../../actions)


This project is an example of using GitHub Actions to automatically deploy a .NET 8 client-side
This project is an example of using GitHub Actions to automatically deploy a .NET 9 client-side
Blazor app to GitHub Pages. For a live demo, check the following link:

https://blazorgithubpages.github.io
Expand All @@ -13,14 +13,14 @@ of the steps needed for a successful deploy.


This project differs from [the project from which it's forked](https://github.com/fernandreu/blazor-pages) in that:
- It is .NET 8, not .NET Core 3.1
- It is .NET 9, not .NET Core 3.1
- Fewer steps from fork to running site (see below)

## How to deploy
1. Create a repository based on this template via the "Use this template" button (you don't fork, a fork is for contributing to this template or creating your own template)
2. Go to your repository Settings > GitHub Pages > set the source branch to `gh-pages-from-actions`
3. [Set permissions for GitHub Actions](https://stackoverflow.com/questions/73687176/permission-denied-to-github-actionsbot-the-requested-url-returned-error-403)
4. Enable Dependabot: `Insights` > `Dependency graph` > `Dependabot` > Enable Dependabot
4. (optional) Enable Dependabot: `Insights` > `Dependency graph` > `Dependabot` > Enable Dependabot
5. View your site at https://[ `your user name` | `your organization name` ].github.io

## How it works
Expand Down Expand Up @@ -63,4 +63,4 @@ should contain the following three variables:
The `gh-pages` branch **must** exist already for the deployment to be successful (this
is a temporary limitation in the pipeline configuration).

In the case of GitHub Actions, only a single secret is needed: `ACCESS_TOKEN`, equivalent to `GitHubPAT` above. An example of a full deployment using GitHub Actions can also be found in my [blazor-fractals](https://github.com/fernandreu/blazor-fractals) repository.
In the case of GitHub Actions, only a single secret is needed: `ACCESS_TOKEN`, equivalent to `GitHubPAT` above. An example of a full deployment using GitHub Actions can also be found in my [blazor-fractals](https://github.com/fernandreu/blazor-fractals) repository.
6 changes: 3 additions & 3 deletions src/BlazorPages/BlazorPages.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<ServiceWorkerAssetsManifest>service-worker-assets.js</ServiceWorkerAssetsManifest>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.10" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.10" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.1" PrivateAssets="all" />
<PackageReference Include="Serilog" Version="4.2.0" />
<PackageReference Include="Serilog.Sinks.BrowserConsole" Version="8.0.0" />
</ItemGroup>
Expand Down
Loading