@@ -20,6 +20,7 @@ interface QueryResult {
2020 data ?: {
2121 packages : { items : { name : string ; path : string } [ ] }
2222 affectedTasks : { items : ChangedTask [ ] }
23+ docsSite : { items : { fullName : string } [ ] }
2324 }
2425}
2526const root = process . cwd ( )
@@ -29,6 +30,7 @@ const suites: { http: Suite[]; production: Suite[] } = JSON.parse(
2930const sourceBase = process . argv [ 2 ]
3031let files : string [ ] = [ ]
3132let tasks : ChangedTask [ ] = [ ]
33+ let docsSiteChanged = false
3234let base = sourceBase
3335let fallback : string | undefined
3436
8082 if (
8183 result . errors ?. length ||
8284 ! Array . isArray ( result . data ?. affectedTasks ?. items ) ||
85+ ! Array . isArray ( result . data ?. docsSite ?. items ) ||
8386 ! Array . isArray ( result . data ?. packages ?. items )
8487 )
8588 throw new Error ( 'Turborepo did not return a complete task plan' )
98101 )
99102 )
100103 throw new Error ( 'Malformed task attribution' )
104+ docsSiteChanged = result . data . docsSite . items . some ( ( task ) => task . fullName === 'docs#build' )
101105} catch ( error ) {
102106 fallback = String ( error )
103107}
@@ -108,7 +112,7 @@ const http = suites.http.filter((suite) => affected(suite.task))
108112const production = suites . production . filter ( ( suite ) => affected ( suite . task ) )
109113const desktopLive = affected ( 'ci:desktop-live' )
110114const appTest = affected ( 'test' )
111- const docsSite = fallback !== undefined || selected . has ( 'docs#build' )
115+ const docsSite = fallback !== undefined || docsSiteChanged
112116const docsPlatform = affected ( 'ci:e2e-docs-platform' )
113117const docsGroups = docsSite
114118 ? [ 'http' , 'corpus' , 'chromium' , 'webkit' ]
0 commit comments