mirror of
https://github.com/GenderDysphoria/GenderDysphoria.fyi.git
synced 2025-01-30 23:06:18 +00:00
Copy published build into /published folder so we can do diffs on future changes
This commit is contained in:
parent
4889ee81d0
commit
a9b416f7bd
1
.gitignore
vendored
1
.gitignore
vendored
@ -17,3 +17,4 @@ node_modules
|
||||
/analytics/RAW/*
|
||||
/analytics/combined.log
|
||||
/assets.json
|
||||
/published
|
||||
|
@ -11,3 +11,8 @@ exports.dev = function cleanDistributionForDev () {
|
||||
return src([ 'dist/**.{js|json|jsx}', 'rev-manifest.json', 'pages.json', 'assets.json' ], { read: false, allowEmpty: true })
|
||||
.pipe(clean());
|
||||
};
|
||||
|
||||
exports.prodBackup = function cleanProdCopy () {
|
||||
return src([ 'published' ], { read: false, allowEmpty: true })
|
||||
.pipe(clean());
|
||||
};
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
const { series, watch } = require('gulp');
|
||||
const { series, watch, src, dest } = require('gulp');
|
||||
|
||||
/** **************************************************************************************************************** **/
|
||||
|
||||
@ -26,6 +26,10 @@ exports.cloudfront = cloudfront;
|
||||
|
||||
exports.new = require('../build/new-post.js');
|
||||
|
||||
function copyProd () {
|
||||
return src('dist/**/*').pipe(dest('published'));
|
||||
}
|
||||
|
||||
/** **************************************************************************************************************** **/
|
||||
|
||||
exports.dev = series(devBuildTask);
|
||||
@ -34,6 +38,8 @@ exports.publish = series(
|
||||
cleanTask,
|
||||
prodBuildTask,
|
||||
pushToProd,
|
||||
cleanTask.prodBackup,
|
||||
copyProd,
|
||||
cloudfront.prod,
|
||||
);
|
||||
exports.testpush = pushToProd.dryrun;
|
||||
|
Loading…
x
Reference in New Issue
Block a user