Skip to content

Merge pull request #11 from KristofferStrube/feature/update-version-o… #50

Merge pull request #11 from KristofferStrube/feature/update-version-o…

Merge pull request #11 from KristofferStrube/feature/update-version-o… #50

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@v4
# Install .NET 8.0 SDK
- name: Setup .NET 8 preview
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
include-prerelease: true
# Build
- name: Build
run: dotnet build
# Install PlayWright
- name: Install PlayWright
run: pwsh tests/IntegrationTests/bin/Debug/net8.0/playwright.ps1 install --with-deps
# Run tests
- name: Test
run: dotnet test
# Generate the website
- name: Publish
run: dotnet publish samples/KristofferStrube.Blazor.MediaCaptureStreams.WasmExample/KristofferStrube.Blazor.MediaCaptureStreams.WasmExample.csproj --configuration Release --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/actions-gh-pages@v3
with:
github_token: ${{ secrets.PUBLISH_TOKEN }}
publish_branch: gh-pages
publish_dir: build/wwwroot
allow_empty_commit: false
keep_files: false
force_orphan: true