File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -246,13 +246,23 @@ async function publish(
246
246
247
247
// wait for deployment if we are opening a browser
248
248
let verified = false ;
249
+ const start = new Date ( ) ;
250
+
249
251
if ( options . browser && ghContext . siteUrl && ! notifyGhPagesBranch ) {
250
252
await withSpinner ( {
251
253
message :
252
254
"Deploying gh-pages branch to website (this may take a few minutes)" ,
253
255
} , async ( ) => {
254
256
const noJekyllUrl = joinUrl ( ghContext . siteUrl ! , ".nojekyll" ) ;
255
257
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
+ }
256
266
await sleep ( 2000 ) ;
257
267
const response = await fetch ( noJekyllUrl ) ;
258
268
if ( response . status === 200 ) {
You can’t perform that action at this time.
0 commit comments