Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dotnet8update #2

Merged
merged 8 commits into from
Dec 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .github/gif.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions .github/workflows/publish-to-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build and deploy Blazor WASM app to github pages

on:
push:
branches: '*'

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

jobs:
deploy-to-github-pages:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3

- 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 index.html 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: Publish .NET app
run: dotnet publish ${{ env.WEBAPP_PATH }}${{env.WEBAPP_CSPROJ}} --configuration Release -o ${{ env.WEBAPP_PATH }}${{env.PUBLISH_DIR}}

- name: copy index.html to 404.html AND add .nojekyll file (https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/)
run: |
cp ${{ env.WEBAPP_PATH }}${{env.PUBLISH_DIR}}/wwwroot/index.html ${{ env.WEBAPP_PATH }}${{env.PUBLISH_DIR}}/wwwroot/404.html
touch ${{ env.WEBAPP_PATH }}${{env.PUBLISH_DIR}}/wwwroot/.nojekyll

- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: ${{ env.WEBAPP_PATH }}${{env.PUBLISH_DIR}}/wwwroot
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ bld/
[Ll]og/
[Ll]ogs/

.idea/

# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
Expand Down
25 changes: 0 additions & 25 deletions DragAndDropList.sln

This file was deleted.

73 changes: 0 additions & 73 deletions DragAndDropList/Pages/Index2.razor

This file was deleted.

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

This file was deleted.

17 changes: 0 additions & 17 deletions DragAndDropList/Shared/MainLayout.razor

This file was deleted.

81 changes: 0 additions & 81 deletions DragAndDropList/Shared/MainLayout.razor.css

This file was deleted.

34 changes: 0 additions & 34 deletions DragAndDropList/Shared/NavMenu.razor

This file was deleted.

62 changes: 0 additions & 62 deletions DragAndDropList/Shared/NavMenu.razor.css

This file was deleted.

16 changes: 0 additions & 16 deletions DragAndDropList/Shared/SurveyPrompt.razor

This file was deleted.

Loading