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

Add blazor wasm standalone demo (#9506) #9507

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from

Conversation

ysmoradi
Copy link
Member

@ysmoradi ysmoradi commented Dec 17, 2024

closes #9506

Summary by CodeRabbit

  • New Features

    • Introduced a new job for deploying a Blazor WebAssembly application in the CI/CD workflow.
    • Added CORS configuration capabilities to enhance cross-origin resource sharing settings.
  • Documentation

    • Updated the README to clarify features and hosting details of the bitplatform toolkit and AdminPanel application.
  • Bug Fixes

    • Adjusted service worker script to manage asset exclusions and external assets more effectively.

@ysmoradi ysmoradi requested a review from msynk December 17, 2024 03:19
Copy link

coderabbitai bot commented Dec 17, 2024

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The pull request introduces several enhancements across the project's infrastructure and configuration. A new GitHub Actions workflow job is added for deploying a Blazor WebAssembly standalone application to Azure Static Web Apps. The README.md is updated with more detailed information about the bitplatform toolkit and its tools. The service worker script has been modified to adjust asset exclusions, and the server-side configuration now includes more flexible CORS (Cross-Origin Resource Sharing) settings. These changes primarily focus on improving deployment processes, documentation, and configuration flexibility.

Changes

File Change Summary
.github/workflows/admin-sample.cd.yml Added new deploy_blazor_wasm_standalone job for Blazor WebAssembly deployment to Azure Static Web Apps
README.md Updated introduction section with more details about bitplatform toolkit tools, modified AdminPanel hosting description
src/Templates/Boilerplate/.../service-worker.published.js Removed exclusion for pdfjs-4.7.76-worker.js, modified external assets configuration
src/Templates/Boilerplate/.../Program.Services.cs Enhanced CORS policy configuration with more flexible origin handling
src/Templates/Boilerplate/.../ServerApiSettings.cs Added Cors property and CorsOptions class to support configurable CORS settings

Sequence Diagram

sequenceDiagram
    participant GHA as GitHub Actions
    participant Build as Build Process
    participant Azure as Azure Static Web Apps
    
    GHA->>Build: Trigger Blazor WASM build
    Build->>Build: Set up .NET environment
    Build->>Build: Publish project
    Build->>Azure: Deploy application
    Azure-->>Build: Deployment confirmation
Loading

Poem

🐰 A Rabbit's Deployment Delight 🚀

Workflows dance, a GitHub ballet,
Blazor WASM finds its way,
CORS now flexible and bright,
Azure welcomes with pure delight!

Hop, deploy, and code with glee! 🌈


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (2)
src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Api/ServerApiSettings.cs (1)

163-166: Add XML documentation for the new CORS configuration.

The new CORS configuration classes lack documentation explaining their purpose and usage.

Add documentation:

+/// <summary>
+/// Configuration options for Cross-Origin Resource Sharing (CORS).
+/// </summary>
 public class CorsOptions
 {
+    /// <summary>
+    /// Array of allowed origin URLs that may access the API.
+    /// </summary>
     public string[] AllowedOrigins { get; set; } = [];
 }
.github/workflows/admin-sample.cd.yml (1)

77-114: Fix YAML formatting issues

There are several formatting inconsistencies in the file:

  • Remove trailing spaces (lines 77, 80, 92, 94, 108, 111, 114)
  • Fix spacing after colon (line 110)
🧰 Tools
🪛 yamllint (1.35.1)

[error] 77-77: trailing spaces

(trailing-spaces)


[error] 80-80: trailing spaces

(trailing-spaces)


[error] 92-92: trailing spaces

(trailing-spaces)


[error] 94-94: trailing spaces

(trailing-spaces)


[error] 108-108: trailing spaces

(trailing-spaces)


[warning] 110-110: too many spaces after colon

(colons)


[error] 111-111: trailing spaces

(trailing-spaces)


[error] 114-114: trailing spaces

(trailing-spaces)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2d1d6bd and 720c832.

📒 Files selected for processing (5)
  • .github/workflows/admin-sample.cd.yml (1 hunks)
  • README.md (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/wwwroot/service-worker.published.js (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Api/Program.Services.cs (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Api/ServerApiSettings.cs (2 hunks)
🧰 Additional context used
🪛 yamllint (1.35.1)
.github/workflows/admin-sample.cd.yml

[error] 77-77: trailing spaces

(trailing-spaces)


[error] 80-80: trailing spaces

(trailing-spaces)


[error] 92-92: trailing spaces

(trailing-spaces)


[error] 94-94: trailing spaces

(trailing-spaces)


[error] 108-108: trailing spaces

(trailing-spaces)


[warning] 110-110: too many spaces after colon

(colons)


[error] 111-111: trailing spaces

(trailing-spaces)


[error] 114-114: trailing spaces

(trailing-spaces)

🔇 Additional comments (2)
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/wwwroot/service-worker.published.js (1)

30-30: LGTM: PDF.js worker exclusion is consistent with main file.

The addition of pdfjs-4.7.76-worker.js to the exclusion list is consistent with the existing exclusion of the main PDF.js file. This ensures proper dynamic loading of PDF.js components.

Let's verify the PDF.js file versions are consistent:

✅ Verification successful

Based on the search results, I can verify that:

  1. The PDF.js files exist in the codebase at consistent versions:

    • src/BlazorUI/Bit.BlazorUI.Extras/wwwroot/pdf.js/pdfjs-4.7.76.js
    • src/BlazorUI/Bit.BlazorUI.Extras/wwwroot/pdf.js/pdfjs-4.7.76-worker.js
  2. The service worker exclusion list correctly includes both files:

    • /pdfjs-4.7.76.js$/
    • /pdfjs-4.7.76-worker.js$/

LGTM: PDF.js worker exclusion matches main file version (4.7.76)

The service worker configuration properly excludes both the main PDF.js file and its worker script with matching version numbers (4.7.76), ensuring consistent dynamic loading behavior.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify PDF.js files exist and have matching versions
rg -g "*.js" "pdfjs-4\.7\.76" 

Length of output: 31


Script:

#!/bin/bash
# Let's try a broader search for PDF.js related files and patterns
rg -g "*.js" "pdfjs-" -A 2

Length of output: 66095


Script:

#!/bin/bash
# Search for any PDF.js related files in the codebase
fd "pdfjs"

Length of output: 145


Script:

#!/bin/bash
# Check service worker configuration for PDF related exclusions
rg -g "*.js" "pdf.*worker" -A 2

Length of output: 65963

src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Api/Program.Services.cs (1)

127-135: LGTM! Well-implemented CORS configuration

The changes enhance CORS configuration flexibility by:

  • Supporting configurable allowed origins through settings
  • Maintaining existing security checks
  • Using case-insensitive comparisons for origin validation

Comment on lines +42 to +43
public CorsOptions? Cors { get; set; }

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add validation for CORS configuration.

The new Cors property lacks validation in the Validate method. Consider adding validation to ensure AllowedOrigins is properly configured when CORS is enabled.

Add this to the Validate method:

 if (ForwardedHeaders is not null)
 {
     Validator.TryValidateObject(ForwardedHeaders, new ValidationContext(ForwardedHeaders), validationResults, true);
 }
+if (Cors is not null)
+{
+    if (Cors.AllowedOrigins.Length == 0)
+    {
+        validationResults.Add(new ValidationResult("AllowedOrigins must not be empty when CORS is configured.", new[] { nameof(Cors) }));
+    }
+    Validator.TryValidateObject(Cors, new ValidationContext(Cors), validationResults, true);
+}

Committable suggestion skipped: line range outside the PR's diff.

README.md Outdated
Comment on lines 50 to 52
5. [adminpanel.bitplatform.dev](https://adminpanel.bitplatform.dev): .NET 9 PWA with Blazor WebAssembly
5. [adminpanel.bitplatform.dev](https://adminpanel.bitplatform.dev): .NET 9 PWA with Blazor WebAssembly
6. [adminpanel.bitplatform.cc](https://adminpanel.bitplatform.cc): .NET 9 PWA with Blazor WebAssembly Standalone (Free Azure static web app)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Remove duplicate entries for adminpanel.bitplatform.dev.

There are three identical entries for the admin panel URL, which appears to be a documentation error.

Keep only one entry and fix the numbering:

 4. [todo.bitplatform.dev](https://todo.bitplatform.dev): .NET 8 Pre-rendered PWA with Blazor WebAssembly
-5. [adminpanel.bitplatform.dev](https://adminpanel.bitplatform.dev): .NET 9 PWA with Blazor WebAssembly
-5. [adminpanel.bitplatform.dev](https://adminpanel.bitplatform.dev): .NET 9 PWA with Blazor WebAssembly
-6. [adminpanel.bitplatform.cc](https://adminpanel.bitplatform.cc): .NET 9 PWA with Blazor WebAssembly Standalone (Free Azure static web app)
+5. [adminpanel.bitplatform.cc](https://adminpanel.bitplatform.cc): .NET 9 PWA with Blazor WebAssembly Standalone (Free Azure static web app)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
5. [adminpanel.bitplatform.dev](https://adminpanel.bitplatform.dev): .NET 9 PWA with Blazor WebAssembly
5. [adminpanel.bitplatform.dev](https://adminpanel.bitplatform.dev): .NET 9 PWA with Blazor WebAssembly
6. [adminpanel.bitplatform.cc](https://adminpanel.bitplatform.cc): .NET 9 PWA with Blazor WebAssembly Standalone (Free Azure static web app)
4. [todo.bitplatform.dev](https://todo.bitplatform.dev): .NET 8 Pre-rendered PWA with Blazor WebAssembly
5. [adminpanel.bitplatform.cc](https://adminpanel.bitplatform.cc): .NET 9 PWA with Blazor WebAssembly Standalone (Free Azure static web app)

cd src/Templates/Boilerplate && dotnet build -c Release
dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0
dotnet new install Bit.Boilerplate.0.0.0.nupkg
cd ../../../ && dotnet new bit-bp --name AdminPanel --database PostgreSQL --sample Admin --appInsights --sentry --serverUrl https://adminpanel.bitplatform.cc --filesStorage AzureBlobStorage --notification --captcha reCaptcha --signalR --framework net9.0
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Use environment variable for server URL instead of hardcoding

The server URL is hardcoded to "https://adminpanel.bitplatform.cc" while other jobs use the ${{ env.SERVER_ADDRESS }} environment variable.

Apply this diff to maintain consistency:

-       cd ../../../ && dotnet new bit-bp --name AdminPanel --database PostgreSQL --sample Admin --appInsights --sentry --serverUrl https://adminpanel.bitplatform.cc --filesStorage AzureBlobStorage --notification --captcha reCaptcha --signalR --framework net9.0
+       cd ../../../ && dotnet new bit-bp --name AdminPanel --database PostgreSQL --sample Admin --appInsights --sentry --serverUrl ${{ env.SERVER_ADDRESS }} --filesStorage AzureBlobStorage --notification --captcha reCaptcha --signalR --framework net9.0
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
cd ../../../ && dotnet new bit-bp --name AdminPanel --database PostgreSQL --sample Admin --appInsights --sentry --serverUrl https://adminpanel.bitplatform.cc --filesStorage AzureBlobStorage --notification --captcha reCaptcha --signalR --framework net9.0
cd ../../../ && dotnet new bit-bp --name AdminPanel --database PostgreSQL --sample Admin --appInsights --sentry --serverUrl ${{ env.SERVER_ADDRESS }} --filesStorage AzureBlobStorage --notification --captcha reCaptcha --signalR --framework net9.0

Comment on lines 72 to 122
deploy_blazor_wasm_standalone:
name: build blazor wasm standalone
runs-on: ubuntu-24.04

steps:

- name: Checkout source code
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
global-json-file: src/global.json

- name: Create project from Boilerplate
run: |
cd src/Templates/Boilerplate && dotnet build -c Release
dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0
dotnet new install Bit.Boilerplate.0.0.0.nupkg
cd ../../../ && dotnet new bit-bp --name AdminPanel --database PostgreSQL --sample Admin --appInsights --sentry --serverUrl https://adminpanel.bitplatform.cc --filesStorage AzureBlobStorage --notification --captcha reCaptcha --signalR --framework net9.0

- name: Update core appsettings.json
uses: devops-actions/variable-substitution@v1.2
with:
files: 'AdminPanel/src/Shared/appsettings.json, AdminPanel/src/Client/AdminPanel.Client.Core/appsettings.json, AdminPanel/src/Client/AdminPanel.Client.Web/appsettings.json, AdminPanel/src/Client/AdminPanel.Client.Web/appsettings.Production.json'
env:
WebAppRender.BlazorMode: BlazorWebAssembly
ServerAddress: ${{ env.SERVER_ADDRESS }}
Logging.Sentry.Dsn: ${{ secrets.ADMINPANEL_SENTRY_DSN }}
GoogleRecaptchaSiteKey: ${{ secrets.GOOGLE_RECAPTCHA_SITE_KEY }}
AdsPushVapid.PublicKey: ${{ secrets.ADMINPANEL_PUBLIC_VAPIDKEY }}
ApplicationInsights.ConnectionString: ${{ secrets.APPLICATION_INSIGHTS_CONNECTION_STRING }}

- uses: actions/setup-node@v4
with:
node-version: 22

- name: Install wasm
run: cd src && dotnet workload install wasm-tools

- name: Generate CSS/JS files
run: dotnet build AdminPanel/src/Client/AdminPanel.Client.Core/AdminPanel.Client.Core.csproj -t:BeforeBuildTasks -p:Version="${{ vars.APPLICATION_DISPLAY_VERSION}}" --no-restore -c Release

- name: Publish
run: dotnet publish AdminPanel/src/Client/AdminPanel.Client.Web/AdminPanel.Client.Web.csproj -c Release -p:PwaEnabled=true -o ${{env.DOTNET_ROOT}}/client -p:Version="${{ vars.APPLICATION_DISPLAY_VERSION}}"

- name: Upload to asw
run: |
npm install -g @azure/static-web-apps-cli
swa deploy --deployment-token ${{ secrets.ADMINPANEL_ASW_TOKEN }} --env production --app-location ${{env.DOTNET_ROOT}}/client/wwwroot

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Consider adding environment configuration for production deployment

The job deploys directly to production without an environment configuration, unlike the deploy_api_blazor job which has proper environment settings.

Add environment configuration to ensure proper deployment control:

  deploy_blazor_wasm_standalone:
    name: build blazor wasm standalone
    runs-on: ubuntu-24.04
+   environment:
+     name: 'production'
+     url: https://adminpanel-wasm.bitplatform.dev

    steps:
    # ... existing steps ...
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
deploy_blazor_wasm_standalone:
name: build blazor wasm standalone
runs-on: ubuntu-24.04
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
global-json-file: src/global.json
- name: Create project from Boilerplate
run: |
cd src/Templates/Boilerplate && dotnet build -c Release
dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0
dotnet new install Bit.Boilerplate.0.0.0.nupkg
cd ../../../ && dotnet new bit-bp --name AdminPanel --database PostgreSQL --sample Admin --appInsights --sentry --serverUrl https://adminpanel.bitplatform.cc --filesStorage AzureBlobStorage --notification --captcha reCaptcha --signalR --framework net9.0
- name: Update core appsettings.json
uses: devops-actions/variable-substitution@v1.2
with:
files: 'AdminPanel/src/Shared/appsettings.json, AdminPanel/src/Client/AdminPanel.Client.Core/appsettings.json, AdminPanel/src/Client/AdminPanel.Client.Web/appsettings.json, AdminPanel/src/Client/AdminPanel.Client.Web/appsettings.Production.json'
env:
WebAppRender.BlazorMode: BlazorWebAssembly
ServerAddress: ${{ env.SERVER_ADDRESS }}
Logging.Sentry.Dsn: ${{ secrets.ADMINPANEL_SENTRY_DSN }}
GoogleRecaptchaSiteKey: ${{ secrets.GOOGLE_RECAPTCHA_SITE_KEY }}
AdsPushVapid.PublicKey: ${{ secrets.ADMINPANEL_PUBLIC_VAPIDKEY }}
ApplicationInsights.ConnectionString: ${{ secrets.APPLICATION_INSIGHTS_CONNECTION_STRING }}
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Install wasm
run: cd src && dotnet workload install wasm-tools
- name: Generate CSS/JS files
run: dotnet build AdminPanel/src/Client/AdminPanel.Client.Core/AdminPanel.Client.Core.csproj -t:BeforeBuildTasks -p:Version="${{ vars.APPLICATION_DISPLAY_VERSION}}" --no-restore -c Release
- name: Publish
run: dotnet publish AdminPanel/src/Client/AdminPanel.Client.Web/AdminPanel.Client.Web.csproj -c Release -p:PwaEnabled=true -o ${{env.DOTNET_ROOT}}/client -p:Version="${{ vars.APPLICATION_DISPLAY_VERSION}}"
- name: Upload to asw
run: |
npm install -g @azure/static-web-apps-cli
swa deploy --deployment-token ${{ secrets.ADMINPANEL_ASW_TOKEN }} --env production --app-location ${{env.DOTNET_ROOT}}/client/wwwroot
deploy_blazor_wasm_standalone:
name: build blazor wasm standalone
runs-on: ubuntu-24.04
environment:
name: 'production'
url: https://adminpanel-wasm.bitplatform.dev
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
global-json-file: src/global.json
- name: Create project from Boilerplate
run: |
cd src/Templates/Boilerplate && dotnet build -c Release
dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0
dotnet new install Bit.Boilerplate.0.0.0.nupkg
cd ../../../ && dotnet new bit-bp --name AdminPanel --database PostgreSQL --sample Admin --appInsights --sentry --serverUrl https://adminpanel.bitplatform.cc --filesStorage AzureBlobStorage --notification --captcha reCaptcha --signalR --framework net9.0
- name: Update core appsettings.json
uses: devops-actions/variable-substitution@v1.2
with:
files: 'AdminPanel/src/Shared/appsettings.json, AdminPanel/src/Client/AdminPanel.Client.Core/appsettings.json, AdminPanel/src/Client/AdminPanel.Client.Web/appsettings.json, AdminPanel/src/Client/AdminPanel.Client.Web/appsettings.Production.json'
env:
WebAppRender.BlazorMode: BlazorWebAssembly
ServerAddress: ${{ env.SERVER_ADDRESS }}
Logging.Sentry.Dsn: ${{ secrets.ADMINPANEL_SENTRY_DSN }}
GoogleRecaptchaSiteKey: ${{ secrets.GOOGLE_RECAPTCHA_SITE_KEY }}
AdsPushVapid.PublicKey: ${{ secrets.ADMINPANEL_PUBLIC_VAPIDKEY }}
ApplicationInsights.ConnectionString: ${{ secrets.APPLICATION_INSIGHTS_CONNECTION_STRING }}
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Install wasm
run: cd src && dotnet workload install wasm-tools
- name: Generate CSS/JS files
run: dotnet build AdminPanel/src/Client/AdminPanel.Client.Core/AdminPanel.Client.Core.csproj -t:BeforeBuildTasks -p:Version="${{ vars.APPLICATION_DISPLAY_VERSION}}" --no-restore -c Release
- name: Publish
run: dotnet publish AdminPanel/src/Client/AdminPanel.Client.Web/AdminPanel.Client.Web.csproj -c Release -p:PwaEnabled=true -o ${{env.DOTNET_ROOT}}/client -p:Version="${{ vars.APPLICATION_DISPLAY_VERSION}}"
- name: Upload to asw
run: |
npm install -g @azure/static-web-apps-cli
swa deploy --deployment-token ${{ secrets.ADMINPANEL_ASW_TOKEN }} --env production --app-location ${{env.DOTNET_ROOT}}/client/wwwroot
🧰 Tools
🪛 yamllint (1.35.1)

[error] 77-77: trailing spaces

(trailing-spaces)


[error] 80-80: trailing spaces

(trailing-spaces)


[error] 92-92: trailing spaces

(trailing-spaces)


[error] 94-94: trailing spaces

(trailing-spaces)


[error] 108-108: trailing spaces

(trailing-spaces)


[warning] 110-110: too many spaces after colon

(colons)


[error] 111-111: trailing spaces

(trailing-spaces)


[error] 114-114: trailing spaces

(trailing-spaces)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Blazor wasm stanalone demo is missing
1 participant