Skip to content

Use relative links

Use relative links #9

Workflow file for this run

name: Deploy to GitHub Pages
permissions:
contents: write
on:
push:
branches:
- main
jobs:
deploy-to-github-pages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Replace base path
run: sed -i 's/base href="\/"/base href="\/${{ github.event.repository.name }}\/"/g' src/UmbracoDemo.Client/wwwroot/index.html
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v3.2.0
with:
dotnet-version: 7.x
- name: Publish .NET Core Project
run: dotnet publish ./src/UmbracoDemo.Client/UmbracoDemo.Client.csproj -c Release -o release --nologo
- name: Add .nojekyll file
run: touch release/wwwroot/.nojekyll
- name: Copy index.html to 404.html
run: cp release/wwwroot/index.html release/wwwroot/404.html
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: release/wwwroot
single-commit: true