Skip to content
This repository has been archived by the owner on Oct 1, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1 from vipyrsec/shenanigansd-patch-1
Browse files Browse the repository at this point in the history
ci: use new pages deploy actions
  • Loading branch information
shenanigansd authored Jul 29, 2023
2 parents 7a3dcb4 + 68e38f7 commit 10e2a21
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 22 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/deploy-site.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3

- 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@12ab2b16cf43a7a061fe99da74b6f8f11fb77f5b # v2.0.3
22 changes: 0 additions & 22 deletions .github/workflows/deploy.yaml

This file was deleted.

0 comments on commit 10e2a21

Please sign in to comment.