Skip to content

Update dependency PublishSPAforGitHubPages.Build to v3 #196

Update dependency PublishSPAforGitHubPages.Build to v3

Update dependency PublishSPAforGitHubPages.Build to v3 #196

name: GitHub Pages CI/CD
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
CONFIGURATION: Release
DOTNET_VERSION: 8.0.x
WORKING_DIRECTORY: TryAzureStaticBlazorApp
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: πŸ›’ Checkout
uses: actions/checkout@v4.2.2
- name: ✨ Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: βš™οΈ Install wasm-tools
run: dotnet workload install wasm-tools
- name: 🚚 Restore
run: dotnet restore "${{ env.WORKING_DIRECTORY }}"
- name: πŸ› οΈ Build
run: dotnet build "${{ env.WORKING_DIRECTORY }}" --configuration ${{ env.CONFIGURATION }} --no-restore
- name: πŸ“¦ Publish
run: dotnet publish "${{ env.WORKING_DIRECTORY }}" --configuration ${{ env.CONFIGURATION }} --no-build -p:GHPages=true -p:GHPagesBase="/try-deploy-blazor-wasm-app/" --output publish
- name: πŸš€ Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: publish/wwwroot
force_orphan: true