File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -246,13 +246,23 @@ async function publish(
246246
247247 // wait for deployment if we are opening a browser
248248 let verified = false ;
249+ const start = new Date ( ) ;
250+
249251 if ( options . browser && ghContext . siteUrl && ! notifyGhPagesBranch ) {
250252 await withSpinner ( {
251253 message :
252254 "Deploying gh-pages branch to website (this may take a few minutes)" ,
253255 } , async ( ) => {
254256 const noJekyllUrl = joinUrl ( ghContext . siteUrl ! , ".nojekyll" ) ;
255257 while ( true ) {
258+ const now = new Date ( ) ;
259+ const elapsed = now . getTime ( ) - start . getTime ( ) ;
260+ if ( elapsed > 1000 * 60 * 5 ) {
261+ info ( colors . yellow (
262+ "Deployment took longer than 5 minutes, giving up waiting for deployment to complete" ,
263+ ) ) ;
264+ break ;
265+ }
256266 await sleep ( 2000 ) ;
257267 const response = await fetch ( noJekyllUrl ) ;
258268 if ( response . status === 200 ) {
You can’t perform that action at this time.
0 commit comments