WIP/CI/DOC: Build docs in CircleCI and create preview link
Trying the same approach to generating the preview of the docs as numpy/scipy/matplotlib, using CircleCI and an action to find the link as a CI job status.

Chiming in here unprompted: it seems that the preview is already there and only hidden in the CI job:

https://github.com/pandas-dev/pandas/blob/3083ae932e0b122e963608fb25cf3df06d588b03/.github/workflows/docbuild-and-upload.yml#L91-L96

You preview the docs under `https://pandas.pydata.org/preview/$PR/`, e.g. https://pandas.pydata.org/preview/52038/ for this PR. Meaning, if the goal of this PR is to only enable doc previews from the PR, we don't need to migrate to CircleCI.

As for surfacing this link, the are multiple options:

1. Following https://github.com/pandas-dev/pandas/pull/52038#discussion_r1140591943, there could be a step at the end of the workflow that does nothing but displaying the link.
2. The link could be written to the [job summary](https://github.blog/2022-05-09-supercharging-github-actions-with-job-summaries/).
3. A bot could add a comment to the PR (once) with the link.

If any of these options is interesting, I'm happy to send a patch. I've implemented a PoC for 1./2. in #52139. Not sure what's going on here, the error is not very descriptive. Feels like maybe the CircleCI worker may not have enough resources to build our docs?

@lithomas1 any idea? > Not sure what's going on here, the error is not very descriptive. Feels like maybe the CircleCI worker may not have enough resources to build our docs?
> 
> @lithomas1 any idea?

We have a 1hr timeout, can you try to build the docs in parallel? > We have a 1hr timeout, can you try to build the docs in parallel?

Our docs should be with as many processes as cores by default.

From the logs, I don't know if the problem is the timeout, or if something crashes and the process never finishes... The duration is 1h 0m 1s, it must be the timeout I think.

I don't think there is a way around it (other than emailing CircleCI and asking them to raise our timeout). You could also try specifying the large resource class, which should give 4 cpu. Right now, I think it only uses the medium class, which has 2. > You could also try specifying the large resource class, which should give 4 cpu. Right now, I think it only uses the medium class, which has 2.

I still don't think the problem is the timeout, I think the docs process is crashing, but good idea, as maybe the problem is memory. Let's see how it goes. Seems like we continue to get this kind of traceback / profiling info that we shouldn't get after the workers start, something seems to be broken, but impossible to tell what based on this:
```
         618142 function calls (618124 primitive calls) in 0.137 seconds

   Ordered by: internal time
   List reduced from 182 to 4 due to restriction <4>

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
     1000    0.079    0.000    0.118    0.000 <ipython-input-4-c2a74e076cf0>:1(i ntegrate_f)
   552423    0.038    0.000    0.038    0.000 <ipython-input-3-c138bdd570e3>:1(f )
     3000    0.004    0.000    0.014    0.000 series.py:970(__getitem__)
     3000    0.002    0.000    0.006    0.000 series.py:1076(_get_value)
```

I'll wait to see if the job fails as I expect, and will close this when it does. I think the current system based on our own server is working fine, and no need to move it to CircleCI if it's not easy. No idea what's going on and why CircleCI can't build our docs. I don't think it's worth spending more time on this, and in particular if it doesn't seem reliable and able to provide useful errors on failures. Closing.