Experimental reverted back to older dependency #48
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/github-pages-deploy-action@v3.7.1 | |
with: | |
GITHUB_TOKEN: ${{ secrets.PUBLISH_TOKEN }} | |
BRANCH: gh-pages | |
FOLDER: DayOfTheWeekChallenge/release/wwwroot |