File tree Expand file tree Collapse file tree 8 files changed +265288
-9
lines changed Expand file tree Collapse file tree 8 files changed +265288
-9
lines changed Original file line number Diff line number Diff line change 11
11
with :
12
12
node-version : " 18.15.0"
13
13
14
- - run : yarn install
14
+ - run : yarn
15
15
16
16
# Verify it compiles
17
17
- run : yarn build
Original file line number Diff line number Diff line change
1
+ name : Build
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - source
7
+ pull_request :
8
+
9
+ jobs :
10
+ build :
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - uses : actions/checkout@v4
14
+ - uses : actions/setup-node@v4
15
+ with :
16
+ node-version : ' latest'
17
+
18
+ # Install dependencies
19
+ - run : yarn
20
+
21
+ # Build and output bundle stats to webpack-stats.json
22
+ - run : yarn build
23
+
24
+ # Send bundle stats and build information to RelativeCI
25
+ - name : Send bundle stats to RelativeCI
26
+ uses : relative-ci/agent-action@v2
27
+ with :
28
+ webpackStatsFile : ./webpack-stats.json
29
+ key : ${{ secrets.RELATIVE_CI_KEY }}
30
+ token : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -80,3 +80,6 @@ yarn-error.log
80
80
src /__generated__ /
81
81
82
82
.idea /
83
+
84
+ .next /
85
+ out /
Original file line number Diff line number Diff line change @@ -6,7 +6,8 @@ import { glob } from "glob"
6
6
import { updateCodeData } from "./scripts/update-code-data/update-code-data"
7
7
import { organizeCodeData } from "./scripts/update-code-data/organize-code-data"
8
8
import { sortCodeData } from "./scripts/update-code-data/sort-code-data"
9
- import redirects from "./redirects.json"
9
+ import { RelativeCiAgentWebpackPlugin } from "@relative-ci/agent"
10
+ import { StatsWriterPlugin } from "webpack-stats-plugin"
10
11
11
12
require ( "dotenv" ) . config ( {
12
13
path : `.env.${ process . env . NODE_ENV } ` ,
@@ -537,12 +538,26 @@ export const createPages: GatsbyNode["createPages"] = async ({
537
538
}
538
539
539
540
export const onCreateWebpackConfig : GatsbyNode [ "onCreateWebpackConfig" ] =
540
- async ( { actions } ) => {
541
+ async ( { actions, stage } ) => {
541
542
actions . setWebpackConfig ( {
542
543
resolve : {
543
544
fallback : {
544
545
assert : "assert/" ,
545
546
} ,
546
547
} ,
548
+ ...( stage === "build-javascript" && {
549
+ plugins : [
550
+ new RelativeCiAgentWebpackPlugin ( ) ,
551
+ new StatsWriterPlugin ( {
552
+ enabled : true ,
553
+ filename : "./webpack-stats.json" ,
554
+ stats : {
555
+ assets : true ,
556
+ chunks : true ,
557
+ modules : true ,
558
+ } ,
559
+ } ) ,
560
+ ] ,
561
+ } )
547
562
} )
548
563
}
Original file line number Diff line number Diff line change 57
57
"timeago.js" : " 4.0.2"
58
58
},
59
59
"devDependencies" : {
60
+ "webpack-stats-plugin" : " 1.1.3" ,
61
+ "@relative-ci/agent" : " 4.2.8" ,
60
62
"@svgr/webpack" : " ^8.0.0" ,
61
63
"@tailwindcss/typography" : " 0.5.9" ,
62
64
"@types/codemirror" : " 5.60.7" ,
Original file line number Diff line number Diff line change
1
+ module . exports = {
2
+ // Get current commit message (`git log -1 --pretty=%B`) and send it to RelativeCI as part of the build information
3
+ includeCommitMessage : true ,
4
+ // Save agent payload to disk for debugging
5
+ // @example './relative-ci-payload.json',
6
+ payloadFilepath : undefined ,
7
+ webpack : {
8
+ // Path to Webpack stats JSON file
9
+ stats : "./webpack-stats.json" ,
10
+ } ,
11
+ }
You can’t perform that action at this time.
0 commit comments