fix(build): Update GitHub Pages deployment to include built files

Modify the updateGithubPages task to run clean and build and
then git add build/msg dist/*_compressed.js*, so that they will
be included in the deployed pages.

This fixes the problem created by the previous^2 commit,
wherein the demos relied on built files that were not being
deployed to GitHub Pages.
This commit is contained in:
Christopher Allen
2022-10-04 16:43:56 +01:00
parent 6a7d01ab59
commit 13e452f859

View File

@@ -98,7 +98,7 @@ function pushRebuildBranch(done) {
/**
* Update github pages with what is currently in develop.
*
* Prerequisite: build.
* Prerequisites (invoked): clean, build.
*/
const updateGithubPages = gulp.series(
function(done) {
@@ -109,18 +109,20 @@ const updateGithubPages = gulp.series(
done();
},
buildTasks.cleanBuildDir,
packageTasks.cleanReleaseDir,
buildTasks.build,
buildTasks.checkin,
function(done) {
execSync('git commit -am "Rebuild"', { stdio: 'inherit' });
execSync('git push ' + upstream_url + ' gh-pages --force', { stdio: 'inherit' });
execSync('git add build/msg/* dist/*_compressed.js*', {stdio: 'inherit'});
execSync('git commit -am "Rebuild"', {stdio: 'inherit'});
execSync('git push ' + upstream_url + ' gh-pages --force',
{stdio: 'inherit'});
done();
}
);
module.exports = {
// Main sequence targets. Each should invoke any immediate prerequisite(s).
updateGithubPages: gulp.series(packageTasks.package, updateGithubPages),
updateGithubPages,
// Manually-invokable targets that invoke prerequisites.
createRC,