Skip to content

Instantly share code, notes, and snippets.

@RomainDelamare
Last active June 7, 2020 11:37
Show Gist options
  • Save RomainDelamare/188e3d42d11a99945f0e6276fc0a9d18 to your computer and use it in GitHub Desktop.
Save RomainDelamare/188e3d42d11a99945f0e6276fc0a9d18 to your computer and use it in GitHub Desktop.
Yaml file for Blazor hosting on Github pages with Github Actions
name: Build and Deploy to Github Pages
on:
push:
branches:
- master
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.300
- name: Publish with dotnet
run: dotnet publish ./src/BlazorGithubPagesUsingGithubActions.sln --configuration Release --output build
- name: Deploy to Github Pages
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BASE_BRANCH: master
BRANCH: gh-pages
FOLDER: build/wwwroot
CLEAN: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment