Add ghpages.yml #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Deploy to GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
build-and-deploy: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup .NET 8 | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: "8.0.x" | |
- name: Add GitHub registry NuGet source | |
shell: cmd | |
run: | | |
dotnet nuget add source https://nuget.pkg.github.com/dotnet-websharper/index.json ^ | |
--name github ^ | |
--username intellifactory-gh ^ | |
--password "${{ secrets.PAT_PACKAGE }}" ^ | |
--store-password-in-clear-text | |
- name: Build WebSharper Project | |
run: dotnet build WebSharper.Notifications.Sample/WebSharper.Notifications.Sample.fsproj --configuration Release | |
- name: Prepare Deployment | |
run: | | |
mkdir -p dist | |
cp -r WebSharper.Notifications.Sample/wwwroot/* dist/ | |
- name: Deploy 🚀 | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: dist |