Skip to content

edits here

edits here #149

Workflow file for this run

name: Build Blazor
on:
push:
branches: [ "main" ]
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Install WASM workload
run: |
dotnet workload install wasm-tools
pwd && ls -la
- name: Restore workloads
run: |
dotnet workload restore
pwd && ls -la
- name: Build and Publish
run: |
pwd && ls -la
dotnet publish LaunchApp/LaunchApp.csproj -c Release -o ${{ runner.temp }}/published_app
- name: Setup base href
run: |
pwd && ls -la
sed -i 's/base href="\/"/base href="\/${{ github.event.repository.name }}\/"/' ${{ runner.temp }}/published_app/wwwroot/index.html
- name: Deploy to GitHub Pages
run: |
pwd && ls -la
git checkout --orphan gh-pages
git clean -fdx
git rm -rf .
cp -r ${{ runner.temp }}/published_app/wwwroot/. .
touch .nojekyll
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -m "Deploy Blazor app to GitHub Pages"
git push -f origin gh-pages