Skip to content

Commit

Permalink
Create main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Oia20 authored Apr 19, 2024
1 parent 86b2c2c commit 842a095
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: build and test and deploy

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
deploy-to-github-pages:
runs-on: ubuntu-latest
steps:
# Checkout the code
- uses: actions/checkout@v4

# Install .NET Core SDK
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

# Install dotnet wasm buildtools workload
- name: Install .NET WASM Build Tools
run: dotnet workload install wasm-tools

# Publishes Blazor project to the release-folder
- name: Publish .NET Core Project
run: dotnet publish ./Web/Web.csproj -c:Release -p:GHPages=true -o dist/Web --nologo

- name: Commit wwwroot to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
BRANCH: gh-pages
FOLDER: dist/Web/wwwroot

0 comments on commit 842a095

Please sign in to comment.