Skip to content

Commit

Permalink
Added CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferStrube committed Sep 24, 2023
1 parent 9b0dbf0 commit 48ed531
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: 'Publish application'

on:
push:
branches:
- main
paths-ignore:
- '**/README.md'

jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout the code
- uses: actions/checkout@v2

# Install .NET 8.0 SDK
- name: Setup .NET 8 preview
uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.0.x'
include-prerelease: true

# Generate the website
- name: Publish
run: dotnet publish samples/KristofferStrube.Blazor.WebAuthentication.WasmExample/KristofferStrube.Blazor.WebAudio.WebAuthentication.csproj --configuration Release --output build

# Publish the website
- name: GitHub Pages action
if: ${{ github.ref == 'refs/heads/main' }} # Publish only when the push is on main
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.PUBLISH_TOKEN }}
publish_branch: gh-pages
publish_dir: build/wwwroot
allow_empty_commit: false
keep_files: false
force_orphan: true

0 comments on commit 48ed531

Please sign in to comment.