Skip to content

Update action.yml with new icon #19

Update action.yml with new icon

Update action.yml with new icon #19

name: Deploy to GitHub Pages
env:
PUBLISH_DIR: src/Blazor.Client.HelloWorld/bin/Release/net8.0/publish/wwwroot
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Publish app
run: dotnet publish ./src/Blazor.Client.HelloWorld/Blazor.Client.HelloWorld.csproj -c Release
- name: Rewrite base href
uses: SteveSandersonMS/ghaction-rewrite-base-href@v1
with:
html_path: ${{ env.PUBLISH_DIR }}/index.html
base_href: /github-sample/
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: published-app
path: ${{ env.PUBLISH_DIR }}
deploy:
runs-on: ubuntu-latest
needs: build
permissions:
pages: write
id-token: write
actions: read
contents: write
environment:
name: github-pages
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: published-app
path: ./wwwroot
- name: GitHub Pages
if: success()
uses: crazy-max/ghaction-github-pages@v4
with:
target_branch: gh-pages
build_dir: ./wwwroot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}