Skip to content

Update index.html

Update index.html #7

name: upload-github-pages
on:
push:
branches:
- master
jobs:
deploy-to-github-pages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: "8.0.x"
- name: Publish .NET Core Project
run: dotnet publish ./BlazorApp1/BlazorApp1.csproj -c Release -o release --nologo
- name: Add .nojekyll file
run: touch release/wwwroot/.nojekyll
# changes the base-tag in index.html from '/' to 'BlazorGitHubPagesDemo' to match GitHub Pages repository subdirectory
- name: Change base-tag in index.html from / to Blazor-festa-random-person/
run: sed -i 's/<base href="\/" \/>/<base href="\/Blazor-festa-random-person\/" \/>/g' release/wwwroot/index.html
- name: Commit wwwroot to GitHub Pages
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: release/wwwroot