Skip to content

Register serialized. #35

Register serialized.

Register serialized. #35

Workflow file for this run

name: 'Publish application'
on:
push:
branches:
- main
paths-ignore:
- '**/README.md'
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout the code
- uses: actions/checkout@v2
# Install .NET 8.0 SDK
- name: Setup .NET 8 preview
uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.0.x'
include-prerelease: true
# Settings for elmah.io
- name: Replace elmah.io API_KEY
uses: richardrigutins/replace-in-files@v2
with:
files: 'samples/KristofferStrube.Blazor.WebAuthentication.WasmExample/Program.cs'
search-text: '<API_KEY>'
replacement-text: '${{ secrets.ELMAH_IO_API_KEY }}'
- name: Replace elmah.io LOG_ID
uses: richardrigutins/replace-in-files@v2
with:
files: 'samples/KristofferStrube.Blazor.WebAuthentication.WasmExample/Program.cs'
search-text: '<LOG_ID>'
replacement-text: '${{ secrets.ELMAH_IO_LOG_ID }}'
# Generate the website
- name: Publish
run: dotnet publish samples/KristofferStrube.Blazor.WebAuthentication.WasmExample/KristofferStrube.Blazor.WebAuthentication.WasmExample.csproj --configuration Release /p:EnvironmentName=Production --output build
# Publish the website
- name: GitHub Pages action
if: ${{ github.ref == 'refs/heads/main' }} # Publish only when the push is on main
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.PUBLISH_TOKEN }}
publish_branch: gh-pages
publish_dir: build/wwwroot
allow_empty_commit: false
keep_files: false
force_orphan: true