import paket in sample project #3
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: Install Paket as a .NET Tool | |
run: dotnet tool restore | |
- name: Add GitHub registry NuGet source | |
shell: cmd | |
run: | | |
dotnet paket config add-credentials https://nuget.pkg.github.com/dotnet-websharper/index.json ^ | |
--username intellifactory-gh ^ | |
--password "${{ secrets.PAT_PACKAGE }}" ^ | |
- name: Restore Dependencies Using Paket | |
run: dotnet paket restore | |
- name: Build WebSharper Project | |
run: dotnet build WebSharper.TouchEvents.Sample/WebSharper.TouchEvents.Sample.fsproj --configuration Release | |
- name: Prepare Deployment | |
run: | | |
mkdir -p dist | |
cp -r WebSharper.TouchEvents.Sample/wwwroot/* dist/ | |
- name: Deploy 🚀 | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: dist |