Skip to content

Commit b1cbf17

Browse files
AnalogJhansl
authored andcommitted
fix(build): use custom index value when copying to 404.html during github deploy (#3201)
1 parent c816402 commit b1cbf17

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/angular-cli/commands/github-pages-deploy.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ const githubPagesDeployCommand = Command.extend({
9797
const projectName = this.project.pkg.name;
9898

9999
const outDir = CliConfig.fromProject().config.apps[0].outDir;
100+
const indexFilename = CliConfig.fromProject().config.apps[0].index;
100101

101102
let ghPagesBranch = 'gh-pages';
102103
let destinationBranch = options.userPage ? 'master' : ghPagesBranch;
@@ -216,7 +217,7 @@ const githubPagesDeployCommand = Command.extend({
216217
}
217218

218219
function createNotFoundPage() {
219-
const indexHtml = path.join(root, 'index.html');
220+
const indexHtml = path.join(root, indexFilename);
220221
const notFoundPage = path.join(root, '404.html');
221222
return fsCopy(indexHtml, notFoundPage);
222223
}

0 commit comments

Comments
 (0)