Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
pieckenst committed Oct 31, 2024
1 parent cd6cab3 commit 193ada3
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: Build Blazor

on:
workflow_dispatch:
push:
branches: [ "main" ]

workflow_dispatch:

permissions:
contents: write
Expand All @@ -26,10 +25,6 @@ jobs:
run: |
dotnet workload install wasm-tools
dotnet workload install wasm-tools-net7
dotnet workload list
pwd && ls -la
echo "Workload paths:"
find /usr/share/dotnet/packs -name "Microsoft.NET.Runtime.WebAssembly.Sdk"
- name: Restore workloads
run: dotnet workload restore
Expand All @@ -38,18 +33,13 @@ jobs:
run: dotnet restore

- name: Build and Publish
run: |
pwd && ls -la
dotnet publish LaunchApp/LaunchApp.csproj -c Release -o ${{ runner.temp }}/published_app --no-restore
run: dotnet publish LaunchApp/LaunchApp.csproj -c Release -o ${{ runner.temp }}/published_app

- name: Setup SPA routing
run: |
sed -i 's/base href="\/"/base href="\/${{ github.event.repository.name }}\/"/' ${{ runner.temp }}/published_app/wwwroot/index.html
sed -i 's/autostart="false"/autostart="true"/' ${{ runner.temp }}/published_app/wwwroot/index.html
- name: Setup base href
run: 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 .
Expand Down

0 comments on commit 193ada3

Please sign in to comment.