Skip to content

Commit

Permalink
Create main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelcanosantana authored Nov 25, 2023
1 parent c8f700d commit 16a073b
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: github pages

# Run workflow on every push to the master branch
on:
push:
branches:
- main
pull_request:
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 form the main branch
- uses: actions/checkout@v2

# sets up .NET Core SDK 6.0.x
- name: Setup .NET Core SDK
uses: actions/[email protected]

# 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 ./CirsaHack.csproj -c:Release -p:GHPages=true -o dist/Web --nologo

- name: Commit wwwroot to GitHub Pages
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: dist/Web/wwwroot

0 comments on commit 16a073b

Please sign in to comment.