From 59b516df06a32a6cfad75a575d91e8f8cc458a95 Mon Sep 17 00:00:00 2001 From: Payman Delshad Date: Mon, 27 Nov 2023 12:19:00 +0100 Subject: [PATCH] Make sure to pass options.cname --- bin/gh-pages.js | 1 + lib/index.js | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/gh-pages.js b/bin/gh-pages.js index bf51f2c4..37584407 100755 --- a/bin/gh-pages.js +++ b/bin/gh-pages.js @@ -134,6 +134,7 @@ function main(args) { history: !!options.history, user: user, beforeAdd: beforeAdd, + cname: options.cname, }; return publish(options.dist, config); diff --git a/lib/index.js b/lib/index.js index f74e6fd0..22fc22d6 100644 --- a/lib/index.js +++ b/lib/index.js @@ -183,13 +183,15 @@ exports.publish = function publish(basePath, config, callback) { } }) .then((git) => { - log('Copying files'); if (options.nojekyll) { + log('Creating .nojekyll'); fs.createFileSync(path.join(git.cwd, '.nojekyll')); } if (options.cname) { + log('Writing "%s" to CNAME', options.cname); fs.writeFileSync(path.join(git.cwd, 'CNAME'), options.cname); } + log('Copying files'); return copy(files, basePath, path.join(git.cwd, options.dest)).then( function () { return git;