-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathdeployment.cjs
40 lines (39 loc) · 1.06 KB
/
deployment.cjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/**
* (c) 2021, Micro:bit Educational Foundation and contributors
*
* SPDX-License-Identifier: MIT
*/
const {
createDeploymentDetailsFromOptions,
} = require("@microbit-foundation/website-deploy-aws-config");
const { s3Config } = createDeploymentDetailsFromOptions({
production: {
bucket: "python-editor-v3.microbit.org",
mode: "major",
allowPrerelease: true,
},
staging: {
bucket: "stage-python-editor-v3.microbit.org",
prefix: "v/beta",
},
review: {
bucket: "review-python-editor-v3.microbit.org",
mode: "branch-prefix",
},
});
module.exports = {
...s3Config,
region: "eu-west-1",
removeNonexistentObjects: true,
enableS3StaticWebsiteHosting: true,
errorDocumentKey: "index.html",
redirects: [],
params: {
"**/**.html": {
CacheControl: "public, max-age=0, must-revalidate",
},
"static/**": { CacheControl: "public, max-age=31536000, immutable" },
"**/**/!(sw).js": { CacheControl: "public, max-age=31536000, immutable" },
"**/**.css": { CacheControl: "public, max-age=31536000, immutable" },
},
};