File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 14
14
uses : actions/checkout@v4
15
15
- name : Install dependencies
16
16
run : npm ci
17
- - name : Lint
17
+ - name : Test
18
18
run : npm run test
19
19
lint :
20
20
runs-on : ubuntu-latest
43
43
run : npm ci
44
44
- name : Build
45
45
env :
46
+ SKIP_BUILD_COMPRESS : 1
46
47
NODE_OPTIONS : " --max_old_space_size=4096"
47
48
run : npm run build
Original file line number Diff line number Diff line change @@ -4,6 +4,16 @@ import mdx from "@astrojs/mdx";
4
4
import compress from "astro-compress" ;
5
5
import tailwind from "@astrojs/tailwind" ;
6
6
7
+ // Allow skipping compression step for faster test build times
8
+ // DO NOT SKIP COMPRESSION FOR DEPLOYMENT!
9
+ const shouldSkipCompress = Boolean (
10
+ process . env . SKIP_BUILD_COMPRESS && process . env . SKIP_BUILD_COMPRESS . length > 0 ,
11
+ ) ;
12
+
13
+ if ( shouldSkipCompress ) {
14
+ console . log ( "WILL SKIP COMPRESS BUILD STEP" ) ;
15
+ }
16
+
7
17
// https://astro.build/config
8
18
export default defineConfig ( {
9
19
integrations : [
@@ -12,7 +22,7 @@ export default defineConfig({
12
22
} ) ,
13
23
mdx ( ) ,
14
24
tailwind ( ) ,
15
- compress ( ) ,
25
+ shouldSkipCompress ? null : compress ( ) ,
16
26
] ,
17
27
trailingSlash : "ignore" ,
18
28
build : {
You can’t perform that action at this time.
0 commit comments