feat: upgrade demo to 11.1.3. #17
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: Deploy to GitHub Pages | |
env: | |
PROJECT_PATH: demo/Semi.Avalonia.Demo.Web/Semi.Avalonia.Demo.Web.csproj | |
OUTPUT_PATH: demo/Semi.Avalonia.Demo.Web/bin/Release/net8.0-browser/publish/wwwroot | |
on: | |
push: | |
branches: [ "action/deploy" ] | |
pull_request: | |
branches: [ "action/deploy" ] | |
jobs: | |
deploy-to-github-pages: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Setup .NET 8 | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Install wasm-tools | |
run: dotnet workload install wasm-tools | |
- name: Publish .NET Project | |
run: dotnet publish $PROJECT_PATH -c Release --nologo | |
- name: Change base-tag in index.html | |
run: sed -i 's/<base href="\/" \/>/<base href="\/Semi.Avalonia\/" \/>/g' $OUTPUT_PATH/index.html | |
- name: copy index.html to 404.html | |
run: cp $OUTPUT_PATH/index.html $OUTPUT_PATH/404.html | |
- name: Add .nojekyll file | |
run: touch $OUTPUT_PATH/.nojekyll | |
- name: Commit wwwroot to GitHub Pages | |
uses: JamesIves/[email protected] | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BRANCH: gh-pages | |
FOLDER: ${{ env.OUTPUT_PATH }} |