Skip to content

Experimental reverted back to older dependency #48

Experimental reverted back to older dependency

Experimental reverted back to older dependency #48

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches: [ master ]
jobs:
deploy-to-github-pages:
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 master branch
- uses: actions/checkout@v2
# sets up .NET
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
# publishes Blazor project to the release-folder
- name: Publish .NET Core Project
run: dotnet publish DayOfTheWeekChallenge/DayOfTheWeekChallenge.csproj -c Release -o DayOfTheWeekChallenge/release --nologo
# changes the base-tag in index.html from '/' to 'DayOfTheWeekChallenge' to match GitHub Pages repository subdirectory
- name: Change base-tag in index.html from / to DayOfTheWeekChallenge
run: |
sed -i 's/<base href="\/" \/>/<base href="\/DayOfTheWeekChallenge\/" \/>/g' DayOfTheWeekChallenge/release/wwwroot/index.html
cp DayOfTheWeekChallenge/release/wwwroot/index.html DayOfTheWeekChallenge/release/wwwroot/404.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 DayOfTheWeekChallenge/release/wwwroot/.nojekyll
- name: Commit wwwroot to GitHub Pages
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
BRANCH: gh-pages
FOLDER: DayOfTheWeekChallenge/release/wwwroot