mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-05-12 13:51:00 -04:00
set, purge static_assets surrogate key on deploy
This commit is contained in:
parent
e58e9cfa6e
commit
c8445561b3
2 changed files with 6 additions and 7 deletions
|
@ -270,12 +270,11 @@ async.auto({
|
|||
fastly.activateVersion(results.version, function (e, resp) {
|
||||
if (e) throw new Error(e);
|
||||
process.stdout.write('Successfully configured and activated version ' + resp.number + '\n');
|
||||
if (process.env.FASTLY_PURGE_ALL) {
|
||||
fastly.purgeAll(FASTLY_SERVICE_ID, function (error) {
|
||||
if (error) throw new Error(error);
|
||||
process.stdout.write('Purged all.\n');
|
||||
});
|
||||
}
|
||||
// purge static_assets using surrogate key
|
||||
fastly.purgeKey(FASTLY_SERVICE_ID, 'static_assets', function (error) {
|
||||
if (error) throw new Error(error);
|
||||
process.stdout.write('Purged static assets.\n');
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue