Create main.yml #1
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 | |
#Run workflow on every push to the main branch | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
deploy-to-github-pages: | |
# use ubuntu-latest image to run steps on | |
runs-on: ubuntu-latest | |
steps: | |
# uses GitHub's checkout action to checkout code from the main branch | |
- uses: actions/checkout@v4 | |
# sets up .net sdk | |
- uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '8.0.x' | |
# publishes Blazor project to the publish-folder | |
- name: Publish .NET Project | |
run: dotnet publish choixpeau.csproj -c Release | |
- name: Commit wwwroot to GitHub Pages | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages | |
folder: publish/wwwroot |