mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-04 04:58:05 +08:00
898e15d6bb
* docs: update to .NET6 RC1 * add aot to preview action * fix preview site output * print dotnet sdk list * remove setup job * add wasm-tools
65 lines
1.6 KiB
YAML
65 lines
1.6 KiB
YAML
# Each PR will build preview site that help to check code is work as expect.
|
|
|
|
name: Preview Build
|
|
|
|
on: pull_request
|
|
|
|
jobs:
|
|
|
|
build-site:
|
|
name: build preview
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@master
|
|
|
|
- name: Setup .NET Core
|
|
uses: actions/setup-dotnet@v1
|
|
with:
|
|
dotnet-version: 5.0.100
|
|
|
|
- name: Setup .NET 6.0
|
|
uses: actions/setup-dotnet@v1
|
|
with:
|
|
dotnet-version: "6.0.x"
|
|
include-prerelease: true
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: "10.x"
|
|
|
|
- name: Prepare AOT workload
|
|
run: |
|
|
dotnet workload install wasm-tools
|
|
|
|
- name: build site
|
|
id: site
|
|
run: |
|
|
dotnet --list-sdks
|
|
npm install
|
|
dotnet build
|
|
sed -i s/{version}/$PACKAGE_VERSION/g ./site/AntDesign.Docs/Shared/HeaderMenu.razor
|
|
dotnet publish ./site/AntDesign.Docs.Wasm -c Release -f net6 -o _site -p:EnableAOT=true
|
|
env:
|
|
PACKAGE_VERSION: ${{ github.event.number }}
|
|
|
|
- name: upload site artifact
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: site
|
|
path: _site/wwwroot/
|
|
retention-days: 5
|
|
|
|
# Upload PR id for next workflow use
|
|
- name: Save PR number
|
|
if: ${{ always() }}
|
|
run: echo ${{ github.event.number }} > ./pr-id.txt
|
|
|
|
- name: Upload PR number
|
|
if: ${{ always() }}
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: pr
|
|
path: ./pr-id.txt
|