Skip to content

Commit

Permalink
docs: fix webapp build action (ant-design-blazor#3669)
Browse files Browse the repository at this point in the history
* fix build

* revert the nightly build

* remove env

* fix configration

* revert the trigger
  • Loading branch information
ElderJames authored Feb 6, 2024
1 parent ba0c9f1 commit ae67bcb
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/AntDesignDocsWebApp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ on:
push:
branches:
- master

env:
AZURE_WEBAPP_NAME: AntDesignDocsWebApp
AZURE_WEBAPP_PACKAGE_PATH: site/AntDesign.Docs.WebApp/AntDesign.Docs.WebApp/published
CONFIGURATION: Release
DOTNET_CORE_VERSION: 8.0.x
WORKING_DIRECTORY: site/AntDesign.Docs.WebApp/AntDesign.Docs.WebApp
jobs:
build:
Expand Down Expand Up @@ -40,7 +39,7 @@ jobs:
- name: Setup .NET 8.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_CORE_VERSION }}
dotnet-version: 8.0.x

- uses: actions/setup-node@v1
with:
Expand All @@ -53,9 +52,9 @@ jobs:
npm install
dotnet build
- name: Test
run: dotnet test "${{ env.WORKING_DIRECTORY }}" --no-build
run: dotnet test "${{ env.WORKING_DIRECTORY }}"
- name: Publish
run: dotnet publish "${{ env.WORKING_DIRECTORY }}" --configuration ${{ env.CONFIGURATION }} --no-build --output "${{ env.AZURE_WEBAPP_PACKAGE_PATH }}"
run: dotnet publish "${{ env.WORKING_DIRECTORY }}" --configuration Release --output "${{ env.AZURE_WEBAPP_PACKAGE_PATH }}"
- name: Publish Artifacts
uses: actions/upload-artifact@v3
with:
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/nightly-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,19 @@ jobs:
files: ./coverage.cobertura.xml,./cobertura-coverage.xml
fail_ci_if_error: false

- name: "Get Last Release"
id: previoustag
run: |
LAST_VERSION=$(wget --no-check-certificate -qO- https://api.github.com/repos/ant-design-blazor/ant-design-blazor/tags | grep 'name' | cut -d\" -f4 | head -1)
echo "Last Version: ${LAST_VERSION}"
echo "::set-output name=previous_tag::${LAST_VERSION}"
- name: "Get Next Semantic Version"
id: semvers
uses: "WyriHaximus/github-action-next-semvers@v1"
with:
version: ${{ steps.previoustag.outputs.previous_tag }}

- name: "Get Next Version"
id: get_next_version
run: |
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"url": "https://github.com/ElderJames/ant-design-blazor/issues"
},
"scripts": {
"start": "dotnet watch -p ./site/AntDesign.Docs.Server run -f net7",
"start:wasm": "dotnet watch -p ./site/AntDesign.Docs.Wasm run -f net7",
"start": "dotnet watch -p ./site/AntDesign.Docs.Server run -f net8",
"start:wasm": "dotnet watch -p ./site/AntDesign.Docs.Wasm run -f net8",
"build:lib": "gulp build:library",
"build:doc": "gulp build:preview --max-old-space-size=81920",
"preinstall": "dotnet tool restore",
Expand Down

0 comments on commit ae67bcb

Please sign in to comment.