Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/publish/gh-pages/gh-pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,13 +246,23 @@ async function publish(

// wait for deployment if we are opening a browser
let verified = false;
const start = new Date();

if (options.browser && ghContext.siteUrl && !notifyGhPagesBranch) {
await withSpinner({
message:
"Deploying gh-pages branch to website (this may take a few minutes)",
}, async () => {
const noJekyllUrl = joinUrl(ghContext.siteUrl!, ".nojekyll");
while (true) {
const now = new Date();
const elapsed = now.getTime() - start.getTime();
if (elapsed > 1000 * 60 * 5) {
info(colors.yellow(
"Deployment took longer than 5 minutes, giving up waiting for deployment to complete",
));
break;
}
await sleep(2000);
const response = await fetch(noJekyllUrl);
if (response.status === 200) {
Expand Down
Loading