Skip to content

Create main.yml

Create main.yml #1

Workflow file for this run

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