Skip to content

changes

changes #31

Workflow file for this run

name: github pages
# Run workflow on every push to the master branch
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
deploy-to-github-pages:
# Fix: Permission to Luthetus/Luthetus.Ide.git denied to github-actions
permissions:
contents: write
# use ubuntu-latest image to run steps on
runs-on: ubuntu-latest
steps:
# uses GitHub's checkout action to checkout code form the main branch
- uses: actions/checkout@v2
# sets up .NET Core SDK 6.0.x
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
# Install dotnet wasm buildtools workload
- name: Install .NET WASM Build Tools
run: dotnet workload install wasm-tools
# Publishes Blazor project to the release-folder
- name: Publish .NET Core Project
run: dotnet publish Source/Lib/Ide/Host.BlazorWebAssembly/Luthetus.Ide.Wasm.csproj -c:Release -p:GHPages=true -o dist/Web --nologo
# changes the base-tag in index.html from '/' to 'Luthetus.Website' to match GitHub Pages repository subdirectory
- name: Change base-tag in index.html from / to Luthetus.Ide
run: sed -i 's/<base href="\/" \/>/<base href="\/Luthetus.Ide\/" \/>/g' dist/Web/wwwroot/index.html
# add .nojekyll file to tell GitHub pages to not treat this as a Jekyll project. (Allow files and folders starting with an underscore)
- name: Add .nojekyll file
run: touch dist/Web/wwwroot/.nojekyll
- name: Commit wwwroot to GitHub Pages
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: dist/Web/wwwroot