Skip to content

Commit 33b0770

Browse files
committed
fix
1 parent a8971e2 commit 33b0770

File tree

6 files changed

+71
-208
lines changed

6 files changed

+71
-208
lines changed

.github/workflows/admin-sample.cd.yml

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -144,39 +144,6 @@ jobs:
144144
npm install -g @azure/static-web-apps-cli
145145
swa deploy --deployment-token ${{ secrets.ADMINPANEL_ASW_TOKEN }} --env production --app-location client/wwwroot
146146
147-
deploy_api_blazor:
148-
name: deploy api + blazor
149-
needs: build_api_blazor
150-
runs-on: ubuntu-24.04
151-
environment:
152-
name: 'production'
153-
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
154-
155-
steps:
156-
157-
- name: Retrieve server bundle
158-
uses: actions/download-artifact@v6
159-
with:
160-
name: server-web-bundle
161-
162-
- name: Retrieve AppleAuthKey.p8
163-
run: echo "${{ secrets.APPSTORE_API_KEY_PRIVATE_KEY_ADMIN }}" > AppleAuthKey.p8
164-
165-
- name: Deploy to Azure Web App
166-
id: deploy-to-webapp
167-
uses: azure/webapps-deploy@v3
168-
with:
169-
app-name: ${{ env.APP_SERVICE_NAME }}
170-
slot-name: 'production'
171-
publish-profile: ${{ secrets.ADMINPANEL_AZURE_APP_SERVICE_PUBLISH_PROFILE }}
172-
package: .
173-
174-
- name: Purge cache
175-
uses: jakejarvis/cloudflare-purge-action@v0.3.0
176-
env:
177-
CLOUDFLARE_ZONE: ${{ secrets.BITPLATFORM_DEV_CLOUDFLARE_ZONE }}
178-
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
179-
180147
build_blazor_hybrid_windows:
181148
name: build blazor hybrid (windows)
182149
runs-on: windows-2025

.github/workflows/blazorui.demo.cd.yml

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -56,36 +56,6 @@ jobs:
5656
path: server
5757
include-hidden-files: true # Required for wwwroot/.well-known folder
5858

59-
deploy_api_blazor:
60-
name: deploy api + blazor
61-
needs: build_api_blazor
62-
runs-on: ubuntu-24.04
63-
environment:
64-
name: 'production'
65-
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
66-
67-
steps:
68-
69-
- name: Retrieve server bundle
70-
uses: actions/download-artifact@v6
71-
with:
72-
name: server-bundle
73-
74-
- name: Deploy to Azure Web App
75-
id: deploy-to-webapp
76-
uses: azure/webapps-deploy@v3
77-
with:
78-
app-name: ${{ env.APP_SERVICE_NAME }}
79-
slot-name: 'production'
80-
publish-profile: ${{ secrets.COMPONENTS_AZURE_APP_SERVICE_PUBLISH_PROFILE }}
81-
package: .
82-
83-
- name: Purge cache
84-
uses: jakejarvis/cloudflare-purge-action@v0.3.0
85-
env:
86-
CLOUDFLARE_ZONE: ${{ secrets.BITPLATFORM_DEV_CLOUDFLARE_ZONE }}
87-
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
88-
8959
build_blazor_hybrid_windows:
9060
name: build blazor hybrid (windows)
9161
runs-on: windows-2025

.github/workflows/platform.website.cd.yml

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -39,34 +39,4 @@ jobs:
3939
with:
4040
name: server-bundle
4141
path: server
42-
include-hidden-files: true # Required for wwwroot/.well-known folder
43-
44-
deploy_api_blazor:
45-
name: deploy api + blazor
46-
needs: build_api_blazor
47-
runs-on: ubuntu-24.04
48-
environment:
49-
name: 'production'
50-
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
51-
52-
steps:
53-
54-
- name: Retrieve server bundle
55-
uses: actions/download-artifact@v6
56-
with:
57-
name: server-bundle
58-
59-
- name: Deploy to Azure Web App
60-
id: deploy-to-webapp
61-
uses: azure/webapps-deploy@v3
62-
with:
63-
app-name: ${{ env.APP_SERVICE_NAME }}
64-
slot-name: 'production'
65-
publish-profile: ${{ secrets.BITPLATFORM_AZURE_APP_SERVICE_PUBLISH_PROFILE }}
66-
package: .
67-
68-
- name: Purge cache
69-
uses: jakejarvis/cloudflare-purge-action@v0.3.0
70-
env:
71-
CLOUDFLARE_ZONE: ${{ secrets.BITPLATFORM_DEV_CLOUDFLARE_ZONE }}
72-
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
42+
include-hidden-files: true # Required for wwwroot/.well-known folder

.github/workflows/sales-module-demo.cd.yml

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -82,39 +82,6 @@ jobs:
8282
path: server
8383
include-hidden-files: true # Required for wwwroot/.well-known folder
8484

85-
deploy_api_blazor:
86-
name: deploy api + blazor
87-
needs: build_api_blazor
88-
runs-on: ubuntu-24.04
89-
environment:
90-
name: 'production'
91-
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
92-
93-
steps:
94-
95-
- name: Retrieve server bundle
96-
uses: actions/download-artifact@v6
97-
with:
98-
name: server-bundle
99-
100-
- name: Retrieve AppleAuthKey.p8
101-
run: echo "${{ secrets.APPSTORE_API_KEY_PRIVATE_KEY_SALES }}" > AppleAuthKey.p8
102-
103-
- name: Deploy to Azure Web App
104-
id: deploy-to-webapp
105-
uses: azure/webapps-deploy@v3
106-
with:
107-
app-name: 'bit-sales'
108-
slot-name: 'production'
109-
publish-profile: ${{ secrets.SALES_AZURE_APP_SERVICE_PUBLISH_PROFILE }}
110-
package: .
111-
112-
- name: Purge cache
113-
uses: jakejarvis/cloudflare-purge-action@v0.3.0
114-
env:
115-
CLOUDFLARE_ZONE: ${{ secrets.BITPLATFORM_DEV_CLOUDFLARE_ZONE }}
116-
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
117-
11885
build_blazor_hybrid_windows:
11986
name: build blazor hybrid (windows)
12087
runs-on: windows-2025

.github/workflows/sales.website.cd.yml

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -39,34 +39,4 @@ jobs:
3939
with:
4040
name: server-bundle
4141
path: server
42-
include-hidden-files: true # Required for wwwroot/.well-known folder
43-
44-
deploy_api_blazor:
45-
name: deploy api + blazor
46-
needs: build_api_blazor
47-
runs-on: ubuntu-24.04
48-
environment:
49-
name: 'production'
50-
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
51-
52-
steps:
53-
54-
- name: Retrieve server bundle
55-
uses: actions/download-artifact@v6
56-
with:
57-
name: server-bundle
58-
59-
- name: Deploy to Azure Web App
60-
id: deploy-to-webapp
61-
uses: azure/webapps-deploy@v3
62-
with:
63-
app-name: ${{ env.APP_SERVICE_NAME }}
64-
slot-name: 'production'
65-
publish-profile: ${{ secrets.BITSERVICES_AZURE_APP_SERVICE_PUBLISH_PROFILE }}
66-
package: .
67-
68-
- name: Purge cache
69-
uses: jakejarvis/cloudflare-purge-action@v0.3.0
70-
env:
71-
CLOUDFLARE_ZONE: ${{ secrets.BITSERVICES_COMPANY_CLOUDFLARE_ZONE }}
72-
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
42+
include-hidden-files: true # Required for wwwroot/.well-known folder

.github/workflows/todo-sample.cd.yml

Lines changed: 69 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ name: Todo Sample CD
33
# Project templates come equipped with CI/CD for both Azure DevOps and GitHub, providing you with a hassle-free way to get started with your new project. It is important to note that you should not depend on the contents of this file. More info at https://bitplatform.dev/templates/dev-ops
44

55
env:
6-
SERVER_ADDRESS: 'https://todo.bitplatform.dev'
6+
SERVER_WEB_ADDRESS: 'https://todo.bitplatform.dev'
7+
SERVER_API_ADDRESS: 'https://todo-api.bitplatform.dev'
78
AzureOpenAI__ApiKey: ${{ secrets.AzureOpenAI__ApiKey }}
89
AzureOpenAI__Endpoint: ${{ secrets.AzureOpenAI__Endpoint }}
910
AZUREOPENAI__MODEL: ${{ secrets.AZUREOPENAI__MODEL }}
@@ -19,15 +20,15 @@ permissions:
1920

2021
jobs:
2122

22-
build_api_blazor:
23-
name: build api + blazor web
23+
build_api:
24+
name: build api
2425
runs-on: windows-2025
2526

2627
steps:
2728

2829
- name: Checkout source code
2930
uses: actions/checkout@v6
30-
31+
3132
- name: Setup .NET
3233
uses: actions/setup-dotnet@v5
3334
with:
@@ -39,11 +40,62 @@ jobs:
3940

4041
- name: Create project from Boilerplate
4142
run: |
42-
cd src/Templates/Boilerplate && dotnet build -c Release
43-
dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0
44-
dotnet new install Bit.Boilerplate.0.0.0.nupkg
45-
cd ../../../ && dotnet new bit-bp --name TodoSample --database PostgreSQL --sample --appInsights --apiServerUrl ${{ env.SERVER_ADDRESS }} --webAppUrl ${{ env.SERVER_ADDRESS }} --filesStorage AzureBlobStorage --notification --captcha reCaptcha --signalR --ads
43+
cd src/Templates/Boilerplate && dotnet build -c Release
44+
dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0
45+
dotnet new install Bit.Boilerplate.0.0.0.nupkg
46+
cd ../../../ && dotnet new bit-bp --name TodoSample --database PostgreSQL --sample --appInsights --apiServerUrl ${{ env.SERVER_API_ADDRESS }} --webAppUrl ${{ env.SERVER_WEB_ADDRESS }} --filesStorage AzureBlobStorage --notification --captcha reCaptcha --offlineDb --signalR --ads --api Standalone
47+
48+
- name: Use Bit.ResxTranslator
49+
run: |
50+
cd TodoSample
51+
dotnet tool install --global Bit.ResxTranslator --prerelease
52+
bit-resx-translate
4653
54+
- name: Update core appsettings.json
55+
uses: devops-actions/variable-substitution@v1.2
56+
with:
57+
files: 'TodoSample/**/appsettings*json'
58+
env:
59+
ServerAddress: ${{ env.SERVER_API_ADDRESS }}
60+
AdsPushVapid.PublicKey: ${{ secrets.TODO_PUBLIC_VAPIDKEY }}
61+
GoogleRecaptchaSiteKey: ${{ secrets.GOOGLE_RECAPTCHA_SITE_KEY }}
62+
ApplicationInsights.ConnectionString: ${{ secrets.APPLICATION_INSIGHTS_CONNECTION_STRING }}
63+
64+
- name: Publish Server API
65+
run: dotnet publish TodoSample/src/Server/TodoSample.Server.Api/TodoSample.Server.Api.csproj -c Release -o server-api -p:Version="${{ vars.APP_VERSION}}"
66+
67+
- name: Upload server api artifact
68+
uses: actions/upload-artifact@v5
69+
with:
70+
name: server-api-bundle
71+
path: server-api
72+
include-hidden-files: true # Required for wwwroot/.well-known folder
73+
74+
build_blazor:
75+
name: build blazor web
76+
runs-on: windows-2025
77+
78+
steps:
79+
80+
- name: Checkout source code
81+
uses: actions/checkout@v6
82+
83+
- name: Setup .NET
84+
uses: actions/setup-dotnet@v5
85+
with:
86+
global-json-file: src/global.json
87+
88+
- uses: actions/setup-node@v6
89+
with:
90+
node-version: 24
91+
92+
- name: Create project from Boilerplate
93+
run: |
94+
cd src/Templates/Boilerplate && dotnet build -c Release
95+
dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0
96+
dotnet new install Bit.Boilerplate.0.0.0.nupkg
97+
cd ../../../ && dotnet new bit-bp --name TodoSample --database PostgreSQL --sample --appInsights --apiServerUrl ${{ env.SERVER_API_ADDRESS }} --webAppUrl ${{ env.SERVER_WEB_ADDRESS }} --filesStorage AzureBlobStorage --notification --captcha reCaptcha --signalR --ads --api Standalone
98+
4799
- name: Use Bit.ResxTranslator
48100
run: |
49101
cd TodoSample
@@ -56,67 +108,34 @@ jobs:
56108
files: 'TodoSample/**/appsettings*json'
57109
env:
58110
WebAppRender.PrerenderEnabled: true
59-
ServerAddress: ${{ env.SERVER_ADDRESS }}
111+
ServerAddress: ${{ env.SERVER_API_ADDRESS }}
60112
WebAppRender.BlazorMode: 'BlazorWebAssembly'
61113
AdsPushVapid.PublicKey: ${{ secrets.TODO_PUBLIC_VAPIDKEY }}
62114
GoogleRecaptchaSiteKey: ${{ secrets.GOOGLE_RECAPTCHA_SITE_KEY }}
63115
ApplicationInsights.ConnectionString: ${{ secrets.APPLICATION_INSIGHTS_CONNECTION_STRING }}
64-
116+
65117
- name: Install wasm
66118
run: cd src && dotnet workload install wasm-tools
67119

68120
- name: Configure bswup # Always AlwaysPrerender is the last item, so overriding it has the desired effect
69121
run: |
70122
sed -i "s/\/\/ self.mode = 'AlwaysPrerender'/self.mode = 'InitialPrerender'/g" TodoSample/src/Client/TodoSample.Client.Web/wwwroot/service-worker.published.js
71-
123+
72124
- name: Generate CSS/JS files
73125
run: |
74126
dotnet build TodoSample/src/Client/TodoSample.Client.Core/TodoSample.Client.Core.csproj -t:BeforeBuildTasks -p:Version="${{ vars.APP_VERSION}}" --no-restore -c Release
75127
dotnet build TodoSample/src/Client/TodoSample.Client.Web/TodoSample.Client.Web.csproj -t:BeforeBuildTasks -p:Version="${{ vars.APP_VERSION}}" --no-restore -c Release
128+
129+
- name: Publish Server Web
130+
run: dotnet publish TodoSample/src/Server/TodoSample.Server.Web/TodoSample.Server.Web.csproj -c Release -o server-web -p:Version="${{ vars.APP_VERSION}}"
76131

77-
- name: Publish
78-
run: dotnet publish TodoSample/src/Server/TodoSample.Server.Web/TodoSample.Server.Web.csproj -c Release -o server -p:Version="${{ vars.APP_VERSION}}"
79-
80-
- name: Upload server artifact
132+
- name: Upload server web artifact
81133
uses: actions/upload-artifact@v5
82134
with:
83-
name: server-bundle
84-
path: server
135+
name: server-web-bundle
136+
path: server-web
85137
include-hidden-files: true # Required for wwwroot/.well-known folder
86138

87-
deploy_api_blazor:
88-
name: deploy api + blazor
89-
needs: build_api_blazor
90-
runs-on: ubuntu-24.04
91-
environment:
92-
name: 'production'
93-
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
94-
95-
steps:
96-
97-
- name: Retrieve server bundle
98-
uses: actions/download-artifact@v6
99-
with:
100-
name: server-bundle
101-
102-
- name: Retrieve AppleAuthKey.p8
103-
run: echo "${{ secrets.APPSTORE_API_KEY_PRIVATE_KEY_TODO }}" > AppleAuthKey.p8
104-
105-
- name: Deploy to Azure Web App
106-
id: deploy-to-webapp
107-
uses: azure/webapps-deploy@v3
108-
with:
109-
app-name: 'bit-todo'
110-
slot-name: 'production'
111-
publish-profile: ${{ secrets.TODO_AZURE_APP_SERVICE_PUBLISH_PROFILE }}
112-
package: .
113-
114-
- name: Purge cache
115-
uses: jakejarvis/cloudflare-purge-action@v0.3.0
116-
env:
117-
CLOUDFLARE_ZONE: ${{ secrets.BITPLATFORM_DEV_CLOUDFLARE_ZONE }}
118-
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
119-
120139
deploy_blazor_wasm_standalone_aot:
121140
name: build blazor wasm standalone (AOT)
122141
runs-on: ubuntu-24.04

0 commit comments

Comments
 (0)