diff --git a/.circleci/config.yml b/.circleci/config.yml index b7336e952c..23442907d0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -21,6 +21,52 @@ references: environment: REACT: 16 + workflow: &workflow + jobs: + - setup: + filters: + branches: + ignore: gh-pages + - dist: + requires: + - setup + - compile: + requires: + - setup + - lint: + requires: + - setup + - test_dist: + requires: + - dist + - test_lib: + requires: + - compile + - test_es: + requires: + - compile + - test_dom: + requires: + - setup + - test_node: + requires: + - setup + - test_dist_15: + requires: + - dist + - test_lib_15: + requires: + - compile + - test_es_15: + requires: + - compile + - test_dom_15: + requires: + - setup + - test_node_15: + requires: + - setup + jobs: setup: <<: *container_config @@ -177,45 +223,14 @@ jobs: workflows: version: 2 - build-test: - jobs: - - setup - - dist: - requires: - - setup - - compile: - requires: - - setup - - lint: - requires: - - setup - - test_dist: - requires: - - dist - - test_lib: - requires: - - compile - - test_es: - requires: - - compile - - test_dom: - requires: - - setup - - test_node: - requires: - - setup - - test_dist_15: - requires: - - dist - - test_lib_15: - requires: - - compile - - test_es_15: - requires: - - compile - - test_dom_15: - requires: - - setup - - test_node_15: - requires: - - setup + build_test: + <<: *workflow + nightly: + <<: *workflow + triggers: + - schedule: + cron: "0 0 * * *" + filters: + branches: + only: + - master diff --git a/package.json b/package.json index 889013d1b6..f4a2e62970 100644 --- a/package.json +++ b/package.json @@ -196,7 +196,7 @@ "start": "rimraf _site && mkdir _site && node ./scripts/generateColorLess.js && cross-env NODE_ENV=development bisheng start -c ./site/bisheng.config.js", "start:preact": "node ./scripts/generateColorLess.js && cross-env NODE_ENV=development REACT_ENV=preact bisheng start -c ./site/bisheng.config.js", "site": "cross-env NODE_ENV=production bisheng build --ssr -c ./site/bisheng.config.js && node ./scripts/generateColorLess.js", - "predeploy": "antd-tools run clean && npm run site && cp netlify.toml _site", + "predeploy": "antd-tools run clean && npm run site && cp netlify.toml _site && cp -p .circleci _site", "deploy": "bisheng gh-pages --push-only", "pub": "antd-tools run pub", "prepublish": "antd-tools run guard",