Skip to content

Commit dcf19f7

Browse files
authored
- Remove deploy step from build/test workflow (#4130)
- Sync demo/preview deploy files
1 parent 9f9b2da commit dcf19f7

File tree

3 files changed

+28
-61
lines changed

3 files changed

+28
-61
lines changed

.github/workflows/build-core-lib.yml

Lines changed: 1 addition & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -151,60 +151,4 @@ jobs:
151151
continue-on-error: true
152152
with:
153153
path: CoverageReports/SummaryGithub.md
154-
deploy_demo:
155-
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
156-
runs-on: ubuntu-latest
157-
name: Build and Deploy Demo site
158-
env:
159-
DOTNET_VERSION: "net9.0"
160-
DOTNET_CLI_TELEMETRY_OPTOUT: 1
161-
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
162-
DOTNET_NOLOGO: true
163-
DOTNET_GENERATE_ASPNET_CERTIFICATE: false
164-
DOTNET_ADD_GLOBAL_TOOLS_TO_PATH: false
165-
DOTNET_MULTILEVEL_LOOKUP: 0
166-
PROJECT: "examples/Demo/Client/FluentUI.Demo.Client.csproj"
167-
BUILD_ARCH: "Any CPU"
168-
BUILD_CONFIG: "Release"
169-
SKIP_DEPLOY_ON_MISSING_SECRETS: true
170-
steps:
171-
- name: Checkout source
172-
uses: actions/checkout@v4
173-
174-
- name: .NET Setup SDKs
175-
uses: actions/setup-dotnet@v4
176-
with:
177-
dotnet-version: 9.0.205
178-
# dotnet-quality: ga
179-
180-
- name: .NET Builld
181-
run: dotnet build ${{ env.PROJECT }} -c ${{ env.BUILD_CONFIG }} -o publish -f ${{ env.DOTNET_VERSION }} -r linux-x64 --self-contained=true -p:BuildNumber=$BUILD_NUMBER -p:SourceRevisionId=$GITHUB_SHA -p:ContinuousIntegrationBuild=true
182-
183-
- name: .NET Publish
184-
run: dotnet publish ${{ env.PROJECT }} -c ${{ env.BUILD_CONFIG }} -o publish -f ${{ env.DOTNET_VERSION }} -r linux-x64 --self-contained=true -p:BuildNumber=$BUILD_NUMBER -p:SourceRevisionId=$GITHUB_SHA -p:ContinuousIntegrationBuild=true
185-
186-
- name: Deploy demo site to Azure Static Web App
187-
id: builddeploy
188-
uses: Azure/static-web-apps-deploy@v1
189-
with:
190-
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_AMBITIOUS_ISLAND_005801E03 }}
191-
repo_token: ${{ secrets.GITHUB_TOKEN }}
192-
action: "upload"
193-
app_location: "publish/wwwroot"
194-
api_location: "Api"
195-
output_location: "publish/wwwroot"
196-
skip_api_build: true
197-
skip_app_build: true
198-
production_branch: 'dev'
199-
200-
destroy:
201-
if: github.event_name == 'pull_request' && github.event.action == 'closed'
202-
runs-on: ubuntu-latest
203-
name: Close Pull Request Job
204-
steps:
205-
- name: Close Pull Request on Azure Static Web App
206-
id: closepullrequest
207-
uses: Azure/static-web-apps-deploy@v1
208-
with:
209-
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_AMBITIOUS_ISLAND_005801E03 }}
210-
action: "close"
154+

.github/workflows/deploy_demo.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Deploy docs and demo site
22
on:
3+
# Allow manually running the workflow
4+
workflow_dispatch:
5+
36
push:
47
branches:
58
- main
@@ -34,7 +37,7 @@ jobs:
3437
- name: Checkout source
3538
uses: actions/checkout@v4
3639

37-
- name: Setup .NET 9.0
40+
- name: .NET Setup SDKs
3841
uses: actions/setup-dotnet@v4
3942
with:
4043
dotnet-version: 9.0.205
@@ -58,7 +61,7 @@ jobs:
5861
run: dotnet build ${{ env.PROJECT }} -c ${{ env.BUILD_CONFIG }} -o publish -f ${{ env.DOTNET_VERSION }} -r linux-x64 --self-contained=true -p:BuildNumber=$BUILD_NUMBER -p:SourceRevisionId=$GITHUB_SHA -p:ContinuousIntegrationBuild=true
5962

6063
- name: .NET Publish
61-
run: dotnet publish ${{ env.PROJECT }} -c ${{ env.BUILD_CONFIG }} -o publish -f ${{ env.DOTNET_VERSION }} -r linux-x64 --self-contained=true -p:BuildNumber=$BUILD_NUMBER -p:SourceRevisionId=$GITHUB_SHA -p:ContinuousIntegrationBuild=true
64+
run: dotnet publish ${{ env.PROJECT }} -c ${{ env.BUILD_CONFIG }} -o publish -f ${{ env.DOTNET_VERSION }} -r linux-x64 --self-contained=true -p:BuildNumber=$BUILD_NUMBER -p:SourceRevisionId=$GITHUB_SHA -p:ContinuousIntegrationBuild=true --no-build
6265

6366
- name: Deploy demo site to Azure Static Web App
6467
id: builddeploy
@@ -79,7 +82,7 @@ jobs:
7982
runs-on: ubuntu-latest
8083
name: Close Pull Request Job
8184
steps:
82-
- name: Close Pull Request on Azure Static Web App (new subscription)
85+
- name: Close Pull Request on Azure Static Web App
8386
id: closepullrequest
8487
uses: Azure/static-web-apps-deploy@v1
8588
with:

.github/workflows/deploy_preview.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ on:
1111
- '**/*.gitignore'
1212
- '**/*.gitattributes'
1313

14+
pull_request:
15+
types: [opened, synchronize, reopened, closed]
16+
branches: [ main ]
17+
paths-ignore:
18+
- '**/*.gitignore'
19+
- '**/*.gitattributes'
1420
jobs:
1521
build_deploy_demo:
1622
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
@@ -38,14 +44,28 @@ jobs:
3844
dotnet-version: 9.0.205
3945
# dotnet-quality: ga
4046

47+
# - name: Setup .NET 10.0
48+
# uses: actions/setup-dotnet@v4
49+
# with:
50+
# dotnet-version: 10.0.x
51+
# dotnet-quality: preview
52+
53+
- name: NPM Install
54+
uses: actions/setup-node@v4
55+
with:
56+
cache: 'npm'
57+
cache-dependency-path: src/Core.Assets/package-lock.json
58+
59+
- run: npm install "src/Core.Assets/"
60+
4161
- name: .NET Builld
4262
run: dotnet build ${{ env.PROJECT }} -c ${{ env.BUILD_CONFIG }} -o publish -f ${{ env.DOTNET_VERSION }} -r linux-x64 --self-contained=true -p:BuildNumber=$BUILD_NUMBER -p:SourceRevisionId=$GITHUB_SHA -p:ContinuousIntegrationBuild=true
4363

4464
- name: .NET Publish
4565
run: dotnet publish ${{ env.PROJECT }} -c ${{ env.BUILD_CONFIG }} -o publish -f ${{ env.DOTNET_VERSION }} -r linux-x64 --self-contained=true -p:BuildNumber=$BUILD_NUMBER -p:SourceRevisionId=$GITHUB_SHA -p:ContinuousIntegrationBuild=true --no-build
4666

4767
- name: Deploy demo site to Azure Static Web App
48-
id: builddeployn
68+
id: builddeploy
4969
uses: Azure/static-web-apps-deploy@v1
5070
with:
5171
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_AMBITIOUS_ISLAND_005801E03 }}

0 commit comments

Comments
 (0)