diff --git a/.github/workflows/build-core-lib.yml b/.github/workflows/build-core-lib.yml index cc2ac6ac5b..ba5d8894ff 100644 --- a/.github/workflows/build-core-lib.yml +++ b/.github/workflows/build-core-lib.yml @@ -151,60 +151,4 @@ jobs: continue-on-error: true with: path: CoverageReports/SummaryGithub.md - deploy_demo: - if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') - runs-on: ubuntu-latest - name: Build and Deploy Demo site - env: - DOTNET_VERSION: "net9.0" - DOTNET_CLI_TELEMETRY_OPTOUT: 1 - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 - DOTNET_NOLOGO: true - DOTNET_GENERATE_ASPNET_CERTIFICATE: false - DOTNET_ADD_GLOBAL_TOOLS_TO_PATH: false - DOTNET_MULTILEVEL_LOOKUP: 0 - PROJECT: "examples/Demo/Client/FluentUI.Demo.Client.csproj" - BUILD_ARCH: "Any CPU" - BUILD_CONFIG: "Release" - SKIP_DEPLOY_ON_MISSING_SECRETS: true - steps: - - name: Checkout source - uses: actions/checkout@v4 - - - name: .NET Setup SDKs - uses: actions/setup-dotnet@v4 - with: - dotnet-version: 9.0.205 - # dotnet-quality: ga - - - name: .NET Builld - 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 - - - name: .NET Publish - 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 - - - name: Deploy demo site to Azure Static Web App - id: builddeploy - uses: Azure/static-web-apps-deploy@v1 - with: - azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_AMBITIOUS_ISLAND_005801E03 }} - repo_token: ${{ secrets.GITHUB_TOKEN }} - action: "upload" - app_location: "publish/wwwroot" - api_location: "Api" - output_location: "publish/wwwroot" - skip_api_build: true - skip_app_build: true - production_branch: 'dev' - - destroy: - if: github.event_name == 'pull_request' && github.event.action == 'closed' - runs-on: ubuntu-latest - name: Close Pull Request Job - steps: - - name: Close Pull Request on Azure Static Web App - id: closepullrequest - uses: Azure/static-web-apps-deploy@v1 - with: - azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_AMBITIOUS_ISLAND_005801E03 }} - action: "close" + diff --git a/.github/workflows/deploy_demo.yml b/.github/workflows/deploy_demo.yml index 78e7b2b5ef..f6060b9f2d 100644 --- a/.github/workflows/deploy_demo.yml +++ b/.github/workflows/deploy_demo.yml @@ -1,5 +1,8 @@ name: Deploy docs and demo site on: + # Allow manually running the workflow + workflow_dispatch: + push: branches: - main @@ -34,7 +37,7 @@ jobs: - name: Checkout source uses: actions/checkout@v4 - - name: Setup .NET 9.0 + - name: .NET Setup SDKs uses: actions/setup-dotnet@v4 with: dotnet-version: 9.0.205 @@ -58,7 +61,7 @@ jobs: 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 - name: .NET Publish - 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 + 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 - name: Deploy demo site to Azure Static Web App id: builddeploy @@ -79,7 +82,7 @@ jobs: runs-on: ubuntu-latest name: Close Pull Request Job steps: - - name: Close Pull Request on Azure Static Web App (new subscription) + - name: Close Pull Request on Azure Static Web App id: closepullrequest uses: Azure/static-web-apps-deploy@v1 with: diff --git a/.github/workflows/deploy_preview.yml b/.github/workflows/deploy_preview.yml index b7b93077fc..3120063638 100644 --- a/.github/workflows/deploy_preview.yml +++ b/.github/workflows/deploy_preview.yml @@ -11,6 +11,12 @@ on: - '**/*.gitignore' - '**/*.gitattributes' + pull_request: + types: [opened, synchronize, reopened, closed] + branches: [ main ] + paths-ignore: + - '**/*.gitignore' + - '**/*.gitattributes' jobs: build_deploy_demo: if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') @@ -38,6 +44,20 @@ jobs: dotnet-version: 9.0.205 # dotnet-quality: ga + # - name: Setup .NET 10.0 + # uses: actions/setup-dotnet@v4 + # with: + # dotnet-version: 10.0.x + # dotnet-quality: preview + + - name: NPM Install + uses: actions/setup-node@v4 + with: + cache: 'npm' + cache-dependency-path: src/Core.Assets/package-lock.json + + - run: npm install "src/Core.Assets/" + - name: .NET Builld 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 @@ -45,7 +65,7 @@ jobs: 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 - name: Deploy demo site to Azure Static Web App - id: builddeployn + id: builddeploy uses: Azure/static-web-apps-deploy@v1 with: azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_AMBITIOUS_ISLAND_005801E03 }}