This repository has been archived by the owner on Oct 1, 2023. It is now read-only.
Bump actions/deploy-pages from 2.0.3 to 2.0.4 (#7) #7
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: "GitHub Pages - .NET Blazor" | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
build: | |
name: "Build" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout repo" | |
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | |
- name: "Setup .NET" | |
uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # v3.2.0 | |
with: | |
dotnet-version: 7.0 | |
cache: true | |
- name: "Restore the .NET project" | |
run: dotnet restore --locked-mode | |
- name: "Build the site" | |
run: dotnet publish *.csproj -c Release -o release --nologo | |
- name: "Upload artifact" | |
uses: actions/upload-pages-artifact@a753861a5debcf57bf8b404356158c8e1e33150c # v2.0.0 | |
with: | |
path: ./release/wwwroot | |
deploy: | |
name: "Deploy" | |
environment: | |
name: "github-pages" | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: "Deploy to GitHub Pages" | |
id: deployment | |
uses: actions/deploy-pages@9dbe3824824f8a1377b8e298bafde1a50ede43e5 # v2.0.4 |