From ce65a783da69174667df606333ad83111298edf6 Mon Sep 17 00:00:00 2001 From: Sukhrob Ilyosbekov Date: Sat, 20 Jul 2024 00:21:47 -0400 Subject: [PATCH] added deploy to GitHub Pages workflow --- .github/workflows/deploy-gh-pages.yml | 31 +++++++++++++++++++ .github/workflows/dotnet.yml | 28 ----------------- README.md | 2 +- .../FormBuilder.DesignerApp.csproj | 1 + 4 files changed, 33 insertions(+), 29 deletions(-) create mode 100644 .github/workflows/deploy-gh-pages.yml delete mode 100644 .github/workflows/dotnet.yml diff --git a/.github/workflows/deploy-gh-pages.yml b/.github/workflows/deploy-gh-pages.yml new file mode 100644 index 0000000..bfee8bf --- /dev/null +++ b/.github/workflows/deploy-gh-pages.yml @@ -0,0 +1,31 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + deploy-gh-pages: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup .NET 8 + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + + - name: Install .NET WASM Build Tools + run: dotnet workload install wasm-tools + + - name: Publish FormBuilder.DesignerApp Project + run: dotnet publish ./src/FormBuilder.DesignerApp.csproj -c:Release -p:GHPages=true -o dist/Web --nologo + + - name: Commit wwwroot to GitHub Pages + uses: JamesIves/github-pages-deploy-action@v4 + with: + branch: gh-pages + folder: dist/Web/wwwroot diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml deleted file mode 100644 index 21f3021..0000000 --- a/.github/workflows/dotnet.yml +++ /dev/null @@ -1,28 +0,0 @@ -# This workflow will build a .NET project -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net - -name: .NET Build - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Setup .NET 8 - uses: actions/setup-dotnet@v4 - with: - dotnet-version: 8.0.x - - name: Restore dependencies - run: dotnet restore - - name: Build - run: dotnet build --no-restore - - name: Test - run: dotnet test --no-build --verbosity normal diff --git a/README.md b/README.md index ea85787..2fc945a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Blazor Form Builder -[![.NET Build](https://github.com/suxrobGM/blazor-form-builder/actions/workflows/dotnet.yml/badge.svg)](https://github.com/suxrobGM/blazor-form-builder/actions/workflows/dotnet.yml) +[![.NET Build](https://github.com/suxrobGM/blazor-form-builder/actions/workflows/deploy-gh-pages.yml/badge.svg)](https://github.com/suxrobGM/blazor-form-builder/actions/workflows/deploy-gh-pages.yml) Blazor Form Builder is a comprehensive library for generating and managing forms within Blazor applications. It provides a simple interface for creating forms with various field types, including text, numeric, date, and dropdown fields. diff --git a/src/FormBuilder.DesignerApp/FormBuilder.DesignerApp.csproj b/src/FormBuilder.DesignerApp/FormBuilder.DesignerApp.csproj index 7748792..6078ca2 100644 --- a/src/FormBuilder.DesignerApp/FormBuilder.DesignerApp.csproj +++ b/src/FormBuilder.DesignerApp/FormBuilder.DesignerApp.csproj @@ -9,6 +9,7 @@ +