diff --git a/.github/workflows/site-deploy.yml b/.github/workflows/site-deploy.yml index f358c15171..e99df21323 100644 --- a/.github/workflows/site-deploy.yml +++ b/.github/workflows/site-deploy.yml @@ -68,3 +68,4 @@ jobs: with: deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} publish_dir: ./_site + force_orphan: true diff --git a/package.json b/package.json index b6b6cf02ae..8bd805c210 100644 --- a/package.json +++ b/package.json @@ -62,8 +62,8 @@ "compile": "npm run clean && antd-tools run compile-experimental", "changelog": "node ./scripts/print-changelog", "predeploy": "antd-tools run clean && npm run site && cp CNAME _site && npm run site:test", - "deploy": "gh-pages -d _site -b gh-pages", - "deploy:china-mirror": "git checkout gh-pages && git pull origin gh-pages && git push git@gitee.com:ant-design/ant-design.git gh-pages", + "deploy": "gh-pages -d _site -b gh-pages -f", + "deploy:china-mirror": "git checkout gh-pages && git pull origin gh-pages && git push git@gitee.com:ant-design/ant-design.git gh-pages -f", "dist": "antd-tools run dist", "dist:esbuild": "ESBUILD=true npm run dist", "dist:esbuild-no-dup-check": "ESBUILD=true NO_DUP_CHECK=true npm run dist", @@ -225,6 +225,7 @@ "fetch-jsonp": "^1.1.3", "fs-extra": "^10.0.0", "full-icu": "^1.3.0", + "gh-pages": "^4.0.0", "glob": "^8.0.1", "highlight.js": "^11.5.0", "http-server": "^14.0.0",