Skip to content

Update main.yml

Update main.yml #1

Workflow file for this run

name: publish to gh pages
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
# Checkout the code
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.x
- run: dotnet workload install wasm-tools-net6
- name: Restore dependencies
run: dotnet restore
# Publish the site
- name: Publish
run: dotnet publish PatSite.sln -c:Release -o:publish -p:GHPages=true
# Deploy the site
- name: Deploy
uses: peaceiris/actions-gh-pages@v3.9.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: publish/wwwroot
force_orphan: true