Skip to content

Commit

Permalink
.NET8 update
Browse files Browse the repository at this point in the history
  • Loading branch information
tesar-tech committed Dec 25, 2023
1 parent 17494f7 commit 25b2518
Show file tree
Hide file tree
Showing 49 changed files with 188 additions and 3,352 deletions.
46 changes: 25 additions & 21 deletions .github/workflows/publish-to-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,37 @@ name: Build and deploy Blazor WASM app to github pages

on:
push:
branches: [ master ]
branches: [ * ]

env:
PUBLISH_DIR: output
WEBAPP_PATH: ./src/
WEBAPP_CSPROJ: BlazorAndTailwind.csproj

jobs:
deploy-to-github-pages:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.x
- name: Publish with dotnet
run: dotnet publish --configuration Release --output ${{env.PUBLISH_DIR}}

# change base tag in index.html from '/' to 'BlazorAndTailwind'
- name: Change base-tag in index.html from / to BlazorAndTailwind
run: sed -i 's/<base href="\/"[[:blank:]]\/>/<base href="\/BlazorAndTailwind\/" \/>/g' ${{env.PUBLISH_DIR}}/wwwroot/index.html

- name: copy index.html to 404.html
run: cp ${{env.PUBLISH_DIR}}/wwwroot/index.html ${{env.PUBLISH_DIR}}/wwwroot/404.html

- name: Commit wwwroot to GitHub Pages
uses: JamesIves/[email protected]

- name: Tailwind - download and run cli
run: |
wget https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-linux-x64 -O /usr/local/bin/tailwindcss
chmod +x /usr/local/bin/tailwindcss
cd ${{ env.WEBAPP_PATH }}
tailwindcss --input ./wwwroot/app.css --output ./wwwroot/app.min.css --minify
- name: Change <base href="" /> in App.razor to match gh repo name
run: |
REPO_NAME=$(echo "${{ github.repository }}" | awk -F '/' '{print $NF}')
sed -i 's/<base href="\/" \/>/<base href="\/'$REPO_NAME'\/" \/>/g' ${{ env.WEBAPP_PATH }}wwwroot/index.html
- name: Run webapp and generate static files
run: |
dotnet build --project ${{ env.WEBAPP_PATH }}${{env.WEBAPP_CSPROJ}} --configuration Release
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: ${{env.PUBLISH_DIR}}/wwwroot

folder: ${{ env.WEBAPP_PATH }}${{env.PUBLISH_DIR}}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@

# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
.idea/
encodings.xml
src/wwwroot/app.min.css

# Mono auto generated files
mono_crash.*
Expand Down
File renamed without changes.
25 changes: 0 additions & 25 deletions BlazorAndTailwind.sln

This file was deleted.

21 changes: 0 additions & 21 deletions BlazorAndTailwind/BlazorAndTailwind.csproj

This file was deleted.

Binary file removed BlazorAndTailwind/BlazorAndTailwind.zip
Binary file not shown.
59 changes: 0 additions & 59 deletions BlazorAndTailwind/Pages/DropdownMenuPage.razor

This file was deleted.

6 changes: 0 additions & 6 deletions BlazorAndTailwind/Pages/Index.razor

This file was deleted.

83 changes: 0 additions & 83 deletions BlazorAndTailwind/Pages/SizeInterop.razor

This file was deleted.

19 changes: 0 additions & 19 deletions BlazorAndTailwind/Pages/SizeInterop.razor.js

This file was deleted.

30 changes: 0 additions & 30 deletions BlazorAndTailwind/Properties/launchSettings.json

This file was deleted.

32 changes: 0 additions & 32 deletions BlazorAndTailwind/Shared/DropdownMenu.razor

This file was deleted.

21 changes: 0 additions & 21 deletions BlazorAndTailwind/Shared/MainLayout.razor

This file was deleted.

Loading

0 comments on commit 25b2518

Please sign in to comment.