From ab67e44cf9dc00224f18d54e0f6c5ce2f9d611e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=A1=E8=89=B2?= Date: Mon, 11 Mar 2024 15:51:57 +0800 Subject: [PATCH] ci: fix build (#1770) --- .github/workflows/ci.yml | 17 +++++++---------- packages/theme/ng-package.json | 10 +++++++++- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7edacf004..c527a222a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,16 +1,13 @@ name: CI -on: push +# on: push +on: [pull_request] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: jwalton/gh-find-current-pr@master - id: findPr - with: - state: all - uses: actions/setup-node@v3 with: node-version-file: '.nvmrc' @@ -20,7 +17,7 @@ jobs: env: ACCESS_REPO: ${{ github.repository }} ACCESS_TOKEN: ${{ secrets.CI_TOKEN }} - PR_NUMBER: ${{ steps.findPr.outputs.pr }} + PR_NUMBER: ${{ github.event.number }} - uses: actions/cache@v3 with: path: ./node_modules @@ -35,7 +32,7 @@ jobs: run: yarn run site:build - name: 'Deploy Site' run: | - export DEPLOY_DOMAIN=https://preview-${{ steps.findPr.outputs.pr }}-ng-alain-delon.surge.sh + export DEPLOY_DOMAIN=https://preview-${{ github.event.number }}-ng-alain-delon.surge.sh echo "Deploy to $DEPLOY_DOMAIN" cp ./src/dist/browser/index.html ./src/dist/browser/404.html npx surge --project ./src/dist/browser --domain $DEPLOY_DOMAIN @@ -46,19 +43,19 @@ jobs: SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }} - name: 'Update comment on github' run: | - export DEPLOY_DOMAIN=https://preview-${{ steps.findPr.outputs.pr }}-ng-alain-delon.surge.sh + export DEPLOY_DOMAIN=https://preview-${{ github.event.number }}-ng-alain-delon.surge.sh node ./scripts/github/comment.js "[Preview is ready!]($DEPLOY_DOMAIN)" env: ACCESS_REPO: ${{ github.repository }} ACCESS_TOKEN: ${{ secrets.CI_TOKEN }} - PR_NUMBER: ${{ steps.findPr.outputs.pr }} + PR_NUMBER: ${{ github.event.number }} - name: 'When failed' if: failure() run: node ./scripts/github/comment.js "[Preview Build Failed!](https://github.com/ng-alain/delon/actions/runs/${{ github.run_id }})" env: ACCESS_REPO: ${{ github.repository }} ACCESS_TOKEN: ${{ secrets.CI_TOKEN }} - PR_NUMBER: ${{ steps.findPr.outputs.pr }} + PR_NUMBER: ${{ github.event.number }} test: runs-on: ubuntu-latest diff --git a/packages/theme/ng-package.json b/packages/theme/ng-package.json index 1540b943b..c6d7a38c6 100644 --- a/packages/theme/ng-package.json +++ b/packages/theme/ng-package.json @@ -6,5 +6,13 @@ "flatModuleFile": "theme", "entryFile": "public_api.ts" }, - "allowedNonPeerDependencies": ["date-fns", "ng-zorro-antd", "@delon/acl", "@delon/util", "@ant-design/icons-angular"] + "allowedNonPeerDependencies": [ + "date-fns", + "ng-zorro-antd", + "@delon/acl", + "@delon/abc", + "@delon/form", + "@delon/util", + "@ant-design/icons-angular" + ] }