|
1 | 1 | const { |
2 | 2 | createDeploymentDetailsFromOptions, |
3 | | -} = require('@microbit-foundation/website-deploy-aws-config'); |
4 | | -const posixPath = require('path/posix'); |
| 3 | +} = require("@microbit-foundation/website-deploy-aws-config"); |
5 | 4 |
|
6 | 5 | const { s3Config } = createDeploymentDetailsFromOptions({ |
7 | 6 | production: { |
8 | | - bucket: 'ml.microbit.org', |
9 | | - mode: 'root', |
| 7 | + bucket: "createai.microbit.org", |
| 8 | + mode: "root", |
10 | 9 | allowPrerelease: false, |
11 | 10 | }, |
12 | 11 | staging: { |
13 | | - bucket: 'stage-ml.microbit.org', |
| 12 | + bucket: "stage-createai.microbit.org", |
14 | 13 | }, |
15 | 14 | review: { |
16 | | - bucket: 'review-ml.microbit.org', |
17 | | - mode: 'branch-prefix', |
| 15 | + bucket: "review-createai.microbit.org", |
| 16 | + mode: "branch-prefix", |
18 | 17 | }, |
19 | 18 | }); |
20 | 19 |
|
21 | 20 | module.exports = { |
22 | | - deploymentDir: './dist', |
| 21 | + deploymentDir: "./dist", |
23 | 22 | ...s3Config, |
24 | | - // For non-review versions deploy to the prototype URL |
25 | | - bucketPrefix: s3Config.bucketPrefix ?? 'v/prototype', |
26 | | - region: 'eu-west-1', |
| 23 | + region: "eu-west-1", |
27 | 24 | removeNonexistentObjects: true, |
28 | 25 | enableS3StaticWebsiteHosting: true, |
29 | | - errorDocumentKey: 'index.html', |
| 26 | + errorDocumentKey: "index.html", |
30 | 27 | redirects: [], |
31 | 28 | params: { |
32 | | - '**/**.html': { |
33 | | - CacheControl: 'public, max-age=0, must-revalidate', |
| 29 | + "**/**.html": { |
| 30 | + CacheControl: "public, max-age=0, must-revalidate", |
34 | 31 | }, |
35 | | - '**/assets/**': { CacheControl: 'public, max-age=31536000, immutable' }, |
| 32 | + "**/assets/**": { CacheControl: "public, max-age=31536000, immutable" }, |
36 | 33 | // There's lots in public/ that we'd ideally use the bundler for to improve caching |
37 | | - 'css/**': { |
38 | | - CacheControl: 'public, max-age=0, must-revalidate', |
| 34 | + // TODO: this might no longer be true, or at least be an easy fix |
| 35 | + "css/**": { |
| 36 | + CacheControl: "public, max-age=0, must-revalidate", |
39 | 37 | }, |
40 | | - 'firmware/**': { |
41 | | - CacheControl: 'public, max-age=0, must-revalidate', |
| 38 | + "firmware/**": { |
| 39 | + CacheControl: "public, max-age=0, must-revalidate", |
42 | 40 | }, |
43 | | - 'imgs/**': { |
44 | | - CacheControl: 'public, max-age=0, must-revalidate', |
| 41 | + "imgs/**": { |
| 42 | + CacheControl: "public, max-age=0, must-revalidate", |
45 | 43 | }, |
46 | | - 'sounds/**': { |
47 | | - CacheControl: 'public, max-age=0, must-revalidate', |
| 44 | + "sounds/**": { |
| 45 | + CacheControl: "public, max-age=0, must-revalidate", |
48 | 46 | }, |
49 | | - 'webfonts/**': { |
50 | | - CacheControl: 'public, max-age=0, must-revalidate', |
| 47 | + "webfonts/**": { |
| 48 | + CacheControl: "public, max-age=0, must-revalidate", |
51 | 49 | }, |
52 | 50 | }, |
53 | 51 | }; |
0 commit comments