### Bug description

# Issue

When using `quarto publish gh-pages` to push to _private_ GitHub Pages, the tool get stuck on "Deploying gh-pages branch to website", despite the updated GitHub Pages is deployed and live.


# Example

```sh
$ quarto publish gh-pages
? Publish site to https://example-org.github.io/quarto-book-test/ using gh-pages? (Y/n) › Yes
Switched to a new branch 'gh-pages'
[gh-pages (root-commit) b53766a] Initializing gh-pages branch
...
Preparing worktree (resetting branch 'gh-pages'; was at b53766a)
Branch 'gh-pages' set up to track remote branch 'gh-pages' from 'origin'.
HEAD is now at b53766a Initializing gh-pages branch
[gh-pages dd3779a] Built site for gh-pages
 23 files changed, 5334 insertions(+)
...
origin	git@github.com:example-org/quarto-book-test.git (fetch)
origin	git@github.com:example-org/quarto-book-test.git (push)
X11 forwarding request failed on channel 0
To github.com:example-org/quarto-book-test.git
   b53766a..dd3779a  HEAD -> gh-pages

(/) Deploying gh-pages branch to website (this may take a few minutes)
```

The latter progress updater never completes. I had to hit <kbd>Ctrl-C</kbd>.


# Troubleshooting

My best guess is that the tool is polling the wrong URL, because _private_ GitHub Pages uses a "random" `*.pages.github.io` URL for security reasons, e.g. <https://upgraded-spork-34abee09.pages.github.io/>. This is explained at <https://docs.github.com/en/enterprise-cloud@latest/pages/getting-started-with-github-pages/changing-the-visibility-of-your-github-pages-site#about-subdomains-for-privately-published-sites>.


# Session info

This is on Ubuntu 20.04 running:

```sh
$ quarto --version
1.2.215
```

I'm pushing to a _private_ repository configured to use _private_ GitHub Pages.  This is hosted under a GitHub Enterprise Cloud plan.


### Checklist

- [X] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [X] Please [format your issue](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) so it is easier for us to read the bug report.
- [ ] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] Please document the operating system you're running. If on Linux, please provide the specific distribution.
jjallaire
2022-10-14T20:40:07Z
HenrikBengtsson
bug
v1.4
open
GitHub Pages: `quarto publish gh-pages` stalls at "deploying gh-pages ..." for _private_ GitHub Pages
https://github.com/quarto-dev/quarto-cli/issues/2864