@docusaurus/core 0.0.0-5159 → 0.0.0-5168
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commands/deploy.js +10 -0
- package/package.json +10 -10
package/lib/commands/deploy.js
CHANGED
|
@@ -127,6 +127,7 @@ You can also set the deploymentBranch property in docusaurus.config.js .`);
|
|
|
127
127
|
// Save the commit hash that triggers publish-gh-pages before checking
|
|
128
128
|
// out to deployment branch.
|
|
129
129
|
const currentCommit = shellExecLog('git rev-parse HEAD').stdout.trim();
|
|
130
|
+
const currentGitRootDir = shellExecLog('git rev-parse --show-toplevel').stdout.trim();
|
|
130
131
|
const runDeploy = async (outputDirectory) => {
|
|
131
132
|
const fromPath = outputDirectory;
|
|
132
133
|
const toPath = await fs_extra_1.default.mkdtemp(path_1.default.join(os_1.default.tmpdir(), `${projectName}-${deploymentBranch}`));
|
|
@@ -150,6 +151,15 @@ You can also set the deploymentBranch property in docusaurus.config.js .`);
|
|
|
150
151
|
logger_1.default.error `Copying build assets from path=${fromPath} to path=${toPath} failed.`;
|
|
151
152
|
throw err;
|
|
152
153
|
}
|
|
154
|
+
const gitConfigFromPath = path_1.default.join(currentGitRootDir, `.git`, `config`);
|
|
155
|
+
const gitConfigToPath = path_1.default.join(toPath, `.git`, `config`);
|
|
156
|
+
try {
|
|
157
|
+
await fs_extra_1.default.copy(gitConfigFromPath, gitConfigToPath);
|
|
158
|
+
}
|
|
159
|
+
catch (err) {
|
|
160
|
+
logger_1.default.error `Copying git config from path=${gitConfigFromPath} to path=${gitConfigToPath} failed.`;
|
|
161
|
+
throw err;
|
|
162
|
+
}
|
|
153
163
|
shellExecLog('git add --all');
|
|
154
164
|
const commitMessage = process.env.CUSTOM_COMMIT_MESSAGE ??
|
|
155
165
|
`Deploy website - based on ${currentCommit}`;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/core",
|
|
3
3
|
"description": "Easy to Maintain Open Source Documentation Websites",
|
|
4
|
-
"version": "0.0.0-
|
|
4
|
+
"version": "0.0.0-5168",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
"@babel/runtime": "^7.18.3",
|
|
44
44
|
"@babel/runtime-corejs3": "^7.18.3",
|
|
45
45
|
"@babel/traverse": "^7.18.5",
|
|
46
|
-
"@docusaurus/cssnano-preset": "0.0.0-
|
|
47
|
-
"@docusaurus/logger": "0.0.0-
|
|
48
|
-
"@docusaurus/mdx-loader": "0.0.0-
|
|
46
|
+
"@docusaurus/cssnano-preset": "0.0.0-5168",
|
|
47
|
+
"@docusaurus/logger": "0.0.0-5168",
|
|
48
|
+
"@docusaurus/mdx-loader": "0.0.0-5168",
|
|
49
49
|
"@docusaurus/react-loadable": "5.5.2",
|
|
50
|
-
"@docusaurus/utils": "0.0.0-
|
|
51
|
-
"@docusaurus/utils-common": "0.0.0-
|
|
52
|
-
"@docusaurus/utils-validation": "0.0.0-
|
|
50
|
+
"@docusaurus/utils": "0.0.0-5168",
|
|
51
|
+
"@docusaurus/utils-common": "0.0.0-5168",
|
|
52
|
+
"@docusaurus/utils-validation": "0.0.0-5168",
|
|
53
53
|
"@slorber/static-site-generator-webpack-plugin": "^4.0.7",
|
|
54
54
|
"@svgr/webpack": "^6.2.1",
|
|
55
55
|
"autoprefixer": "^10.4.7",
|
|
@@ -106,8 +106,8 @@
|
|
|
106
106
|
"webpackbar": "^5.0.2"
|
|
107
107
|
},
|
|
108
108
|
"devDependencies": {
|
|
109
|
-
"@docusaurus/module-type-aliases": "0.0.0-
|
|
110
|
-
"@docusaurus/types": "0.0.0-
|
|
109
|
+
"@docusaurus/module-type-aliases": "0.0.0-5168",
|
|
110
|
+
"@docusaurus/types": "0.0.0-5168",
|
|
111
111
|
"@types/detect-port": "^1.3.2",
|
|
112
112
|
"@types/react-dom": "^18.0.5",
|
|
113
113
|
"@types/react-router-config": "^5.0.6",
|
|
@@ -127,5 +127,5 @@
|
|
|
127
127
|
"engines": {
|
|
128
128
|
"node": ">=16.14"
|
|
129
129
|
},
|
|
130
|
-
"gitHead": "
|
|
130
|
+
"gitHead": "56cb62e63fa8149e24fd9df43dc73a21f0fc97f0"
|
|
131
131
|
}
|