Skip to content

Update CodeQL workflow to use latest actions #4

Update CodeQL workflow to use latest actions

Update CodeQL workflow to use latest actions #4

Workflow file for this run

name: πŸš€ Deploy to GitHub Pages
on:
push:
branches: [ main ]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
env:
DOTNET_VERSION: '7.0.x'
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: true
jobs:
build:
name: πŸ—οΈ Build Blazor WASM
runs-on: ubuntu-latest
steps:
- name: πŸ“₯ Checkout
uses: actions/checkout@v4
- name: βš™οΈ Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: πŸ“¦ Restore dependencies
run: dotnet restore JsonViewer.Blazor.sln
- name: πŸ—οΈ Build
run: dotnet build JsonViewer.Blazor.sln --configuration Release --no-restore
- name: πŸ“¦ Publish Blazor WASM
run: |
dotnet publish src/Blazor.Demo/Blazor.Demo.csproj \
-c Release \
-o release \
--nologo
- name: πŸ”§ Configure base path
run: |
sed -i 's/<base href="\/" \/>/<base href="\/Blazor\/" \/>/g' release/wwwroot/index.html
- name: πŸ“ Add .nojekyll file
run: touch release/wwwroot/.nojekyll
- name: πŸ“ Add custom 404.html
run: cp release/wwwroot/index.html release/wwwroot/404.html
- name: πŸ“€ Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: release/wwwroot
deploy:
name: πŸš€ Deploy to GitHub Pages
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: 🌐 Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4