Skip to content

.github/workflows/deploy-website.yml #14

.github/workflows/deploy-website.yml

.github/workflows/deploy-website.yml #14

on: workflow_dispatch
jobs:
deploy-website:
name: Deploy BlazorSvgEditor demo website
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup dotnet version
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.x.x
# Generate the website
- name: Publish
run: dotnet publish BlazorSvgEditor.WasmTest/BlazorSvgEditor.WasmTest.csproj --configuration Release --output build
- name: Change base-tag in index.html from / to BlazorGitHubPagesDemo
run: sed -i 's/<base href="\/" \/>/<base href="\/BlazorSvgEditor\/" \/>/g' build/wwwroot/index.html
# Publish the website
- name: GitHub Pages action
uses: peaceiris/actions-gh-pages@v3.9.2
with:
deploy_key: ${{ secrets.DEPLOY_PRIVATE_SSH }}
publish_branch: gh-pages
publish_dir: build/wwwroot
allow_empty_commit: false
keep_files: false
force_orphan: true