Skip to content

Commit ab67e44

Browse files
authored
ci: fix build (#1770)
1 parent b7ea5ac commit ab67e44

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
name: CI
22

3-
on: push
3+
# on: push
4+
on: [pull_request]
45

56
jobs:
67
build:
78
runs-on: ubuntu-latest
89
steps:
910
- uses: actions/checkout@v4
10-
- uses: jwalton/gh-find-current-pr@master
11-
id: findPr
12-
with:
13-
state: all
1411
- uses: actions/setup-node@v3
1512
with:
1613
node-version-file: '.nvmrc'
@@ -20,7 +17,7 @@ jobs:
2017
env:
2118
ACCESS_REPO: ${{ github.repository }}
2219
ACCESS_TOKEN: ${{ secrets.CI_TOKEN }}
23-
PR_NUMBER: ${{ steps.findPr.outputs.pr }}
20+
PR_NUMBER: ${{ github.event.number }}
2421
- uses: actions/cache@v3
2522
with:
2623
path: ./node_modules
@@ -35,7 +32,7 @@ jobs:
3532
run: yarn run site:build
3633
- name: 'Deploy Site'
3734
run: |
38-
export DEPLOY_DOMAIN=https://preview-${{ steps.findPr.outputs.pr }}-ng-alain-delon.surge.sh
35+
export DEPLOY_DOMAIN=https://preview-${{ github.event.number }}-ng-alain-delon.surge.sh
3936
echo "Deploy to $DEPLOY_DOMAIN"
4037
cp ./src/dist/browser/index.html ./src/dist/browser/404.html
4138
npx surge --project ./src/dist/browser --domain $DEPLOY_DOMAIN
@@ -46,19 +43,19 @@ jobs:
4643
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
4744
- name: 'Update comment on github'
4845
run: |
49-
export DEPLOY_DOMAIN=https://preview-${{ steps.findPr.outputs.pr }}-ng-alain-delon.surge.sh
46+
export DEPLOY_DOMAIN=https://preview-${{ github.event.number }}-ng-alain-delon.surge.sh
5047
node ./scripts/github/comment.js "[Preview is ready!]($DEPLOY_DOMAIN)"
5148
env:
5249
ACCESS_REPO: ${{ github.repository }}
5350
ACCESS_TOKEN: ${{ secrets.CI_TOKEN }}
54-
PR_NUMBER: ${{ steps.findPr.outputs.pr }}
51+
PR_NUMBER: ${{ github.event.number }}
5552
- name: 'When failed'
5653
if: failure()
5754
run: node ./scripts/github/comment.js "[Preview Build Failed!](https://github.com/ng-alain/delon/actions/runs/${{ github.run_id }})"
5855
env:
5956
ACCESS_REPO: ${{ github.repository }}
6057
ACCESS_TOKEN: ${{ secrets.CI_TOKEN }}
61-
PR_NUMBER: ${{ steps.findPr.outputs.pr }}
58+
PR_NUMBER: ${{ github.event.number }}
6259

6360
test:
6461
runs-on: ubuntu-latest

packages/theme/ng-package.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,13 @@
66
"flatModuleFile": "theme",
77
"entryFile": "public_api.ts"
88
},
9-
"allowedNonPeerDependencies": ["date-fns", "ng-zorro-antd", "@delon/acl", "@delon/util", "@ant-design/icons-angular"]
9+
"allowedNonPeerDependencies": [
10+
"date-fns",
11+
"ng-zorro-antd",
12+
"@delon/acl",
13+
"@delon/abc",
14+
"@delon/form",
15+
"@delon/util",
16+
"@ant-design/icons-angular"
17+
]
1018
}

0 commit comments

Comments
 (0)