Skip to content

Create action deploy-to-github-pages.yml #1

Create action deploy-to-github-pages.yml

Create action deploy-to-github-pages.yml #1

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: .
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
working-directory: src
run: dotnet restore
- name: Publish
working-directory: src
run: dotnet publish BlazorEmojiSearch/BlazorEmojiSearch.csproj -c Release -o release --nologo --no-restore
- name: Deploy to Github Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: release/wwwroot
SINGLE_COMMIT: true