1
1
Preview Documentation from Pull Requests
2
2
========================================
3
3
4
- Read the Docs allows you to build and preview your documentation from pull requests.
5
- To enable this feature:
6
-
7
- #. Go to your project dashboard
8
- #. Go to :guilabel: `Admin > Advanced settings `
9
- #. Enable the :guilabel: `Build pull requests for this project ` option
10
- #. Click on :guilabel: `Save `
4
+ Your project can be configured to build and host documentation for every new
5
+ pull request. Previewing changes to your documentation during review makes it
6
+ easier to catch documentation formatting and display issues introduced in pull
7
+ requests.
11
8
12
9
Features
13
10
--------
14
11
15
12
Build on pull request events
16
- We create and build a new version when a pull request is open ,
17
- and when a new commit has been pushed.
13
+ We create and build a new version when a pull request is opened ,
14
+ and rebuild the version whenever a new commit is pushed.
18
15
19
16
Build status report
20
- When a build is triggered, a build pending notification is sent with a link to the build log.
21
- When the build finishes we send a success notification with the link to the preview or a failure notification with a link to the build log.
17
+ Your project's pull request build status will show as one of your pull
18
+ request's checks. This status will update as the build is running, and will
19
+ show a success or failure status when the build completes.
20
+
21
+ .. figure :: /_static/images/github-build-status-reporting.gif
22
+ :align: center
23
+ :alt: GitHub build status reporting for pull requests.
24
+ :figwidth: 80%
25
+
26
+ GitHub build status reporting
22
27
23
28
Warning banner
24
- A warning banner is shown at the top of the documentation
25
- to let users know that this isn't the main documentation for the project.
29
+ A warning banner is shown at the top of documentation pages
30
+ to let readers know that this version isn't the main version for the project.
26
31
27
- .. note :: Warning banners are available only for :doc:`Sphinx projects </intro/getting-started-with-sphinx>`.
32
+ .. note :: Warning banners are available only for :doc:`Sphinx projects </intro/getting-started-with-sphinx>`.
28
33
29
- .. figure :: /_static/images/github-build-status-reporting.gif
30
- :align: center
31
- :alt: GitHub build status reporting for pull requests.
32
- :figwidth: 80%
34
+ Configuration
35
+ -------------
33
36
34
- GitHub build status reporting
37
+ To enable this feature for your project,
38
+ your Read the Docs account needs to be connected to an account with a supported VCS provider.
39
+ See `Limitations `_ for more information.
40
+
41
+ If your account is already connected:
42
+
43
+ #. Go to your project dashboard
44
+ #. Go to :guilabel: `Admin `, then :guilabel: `Advanced settings `
45
+ #. Enable the :guilabel: `Build pull requests for this project ` option
46
+ #. Click on :guilabel: `Save `
35
47
36
48
Privacy levels
37
49
--------------
@@ -40,43 +52,60 @@ Privacy levels
40
52
41
53
Privacy levels are only supported on :doc: `/commercial/index `.
42
54
43
- By default all docs built from pull requests are private.
55
+ By default, all docs built from pull requests are private.
44
56
To change their privacy level:
45
57
46
58
#. Go to your project dashboard
47
- #. Go to :guilabel: `Admin > Advanced settings `
59
+ #. Go to :guilabel: `Admin `, then :guilabel: ` Advanced settings `
48
60
#. Select your option in :guilabel: `Privacy level of builds from pull requests `
49
61
#. Click on :guilabel: `Save `
50
62
51
- Privacy levels work the same way as for :ref: `normal versions <versions:privacy levels >`.
63
+ Privacy levels work the same way as :ref: `normal versions <versions:privacy levels >`.
52
64
53
65
Limitations
54
66
-----------
55
67
68
+ - Only available for **GitHub ** and **GitLab ** currently. Bitbucket is not yet supported.
69
+ - To enable this feature, your Read the Docs account needs to be connected to an
70
+ account with your VCS provider.
56
71
- Builds from pull requests have the same memory and time limitations
57
72
:doc: `as regular builds </builds >`.
58
- - Only available for GitHub and GitLab.
59
- - Additional formats like PDF and EPUB aren't built to produce results quicker.
60
- - Searches will default to the default experience for your tool.
73
+ - Additional formats like PDF and EPUB aren't built, to reduce build time.
74
+ - Search queries will default to the default experience for your tool.
61
75
This is a feature we plan to add,
62
76
but don't want to overwhelm our search indexes used in production.
63
77
- The built documentation is kept for 90 days after the pull request has been closed or merged.
64
78
65
79
Troubleshooting
66
80
---------------
67
81
68
- Pull Requests builds are not triggered
69
- We only support GitHub and GitLab currently.
70
- You need to make sure that your Read the Docs account is connected with that provider.
71
- You can check this by going to your :guilabel: `Username dropdown ` > :guilabel: `Settings ` > :guilabel: `Connected Services `.
82
+ No new builds are started when I open a pull request
83
+ The most common cause is that your repository's webhook is not configured to
84
+ send Read the Docs pull request events. You'll need to re-sync your project's
85
+ webhook integration to reconfigure the Read the Docs webhook.
86
+
87
+ To resync your project's webhook, go to your project's admin dashboard,
88
+ :guilabel: `Integrations `, and then select the webhook integration for your
89
+ provider. Follow the directions on to re-sync the webhook, or create a new
90
+ webhook integration.
91
+
92
+ You may also notice this behavior if your Read the Docs account is not
93
+ connected to your VCS provider account, or if it needs to be reconnected.
94
+ You can (re)connect your account by going to your :guilabel: `Username dropdown `,
95
+ :guilabel: `Settings `, then to :guilabel: `Connected Services `.
96
+
72
97
73
98
Build status is not being reported to your VCS provider
74
- You need to make sure that you have granted access to the Read the Docs
75
- OAuth App to your personal or organization GitHub account.
76
- Learn more about this in our :ref: `github-permission-troubleshooting ` section.
99
+ If opening a pull request does start a new build, but the build status is not
100
+ being updated with your VCS provider, then your connected account may have out
101
+ dated or insufficient permisisons.
102
+
103
+ Make sure that you have granted access to the Read the Docs `OAuth App `_ for
104
+ your personal or organization GitHub account. You can also try reconnecting
105
+ your account with your VCS provider.
77
106
78
- Also make sure your webhook integration is properly setup
79
- to handle events related to pull requests. You can setup or `` re-sync `` the integration from your projects admin dashboard.
80
- Learn more about setting up integrations from our :doc: ` integrations documentation < /integrations >`.
107
+ .. seealso ::
108
+ - :ref: ` integrations:Debugging webhooks `
109
+ - :ref: ` github-permission-troubleshooting `
81
110
82
111
.. _OAuth App : https://github.com/settings/applications
0 commit comments