Skip to content

Added current route name to main view side bar (#3) #3

Added current route name to main view side bar (#3)

Added current route name to main view side bar (#3) #3

Workflow file for this run

name: Deploy demo to static pages
on:
push:
branches:
- main
- deploy-avalonia
env:
PUBLISH_DIR: src/samples/Avalonia/SimpleRouter.Avalonia.Demo.Browser/bin/Release/net8.0/browser-wasm/AppBundle/
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: 'Install workload: wasm-tools'
run: dotnet workload install wasm-tools
- name: 'Publish SimpleRouter.Avalonia.Demo.Browser'
run: dotnet publish src/samples/Avalonia/SimpleRouter.Avalonia.Demo.Browser/SimpleRouter.Avalonia.Demo.Browser.csproj -c Release
- name: Fix permissions
run: |
chmod -c -R +rX "${{ env.PUBLISH_DIR }}" | while read line; do
echo "::info title=Invalid file permissions automatically fixed::$line"
done
- name: Rewrite base href
uses: SteveSandersonMS/ghaction-rewrite-base-href@v1
with:
html_path: ${{ env.PUBLISH_DIR }}/index.html
base_href: /SimpleRouter/
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: ${{ env.PUBLISH_DIR }}
# Deploy job
deploy:
name: "Deploy SimpleRouter.Avalonia.Demo.Browser to GitHub Pages"
# Add a dependency to the build job
needs: build
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action