Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fb2c59d

Browse files
committed
Add instructions for adding a new subproject
1 parent af232f8 commit fb2c59d

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,38 @@ There is currently only one playbook:
5656
* `matplotlib.org.yml`, for the main matplotlib.org hosting. This playbook
5757
operates on droplets with the `website` tag in DigitalOcean.
5858

59+
Adding a new subproject
60+
=======================
61+
62+
When a new repository is added to the Matplotlib organization with
63+
documentation (or an existing repository adds documentation), it will be
64+
necessary to re-configure the server to serve those files. Note, it is
65+
currently assumed that the documentation is on the `gh-pages` branch of the
66+
repository, and it will be served from the top-level subdirectory with the same
67+
name as the repository (similar to GitHub Pages.) There are 4 steps to achieve
68+
this:
69+
70+
1. Generate a secret to secure the webhook. You can follow [GitHub's
71+
instructions for creating
72+
one](https://docs.github.com/en/developers/webhooks-and-events/webhooks/securing-your-webhooks).
73+
2. Add repository to Ansible:
74+
75+
1. Add an entry to the `repos` variable at the top of `matplotlib.org.yml`.
76+
2. Add the webhook secret to `files/webhook_vars.yml`.
77+
78+
3. Re-run Ansible on the playbook like [below](#running-ansible). This should
79+
clone the new repository and update the webhook handler.
80+
4. Configure a webhook on the new repository with the following settings:
81+
82+
- Payload URL of `https://do.matplotlib.org/gh/<repository>`
83+
- Content type of application/json
84+
- Use the secret generated in step 1
85+
- Trigger only on "push" events
86+
87+
If everything is done correctly, the GitHub webhook should have posted an
88+
initial "ping" event successfully, and documentation should be available at
89+
`https://matplotlib.org/<repository>`.
90+
5991
Provisioning a new server
6092
=========================
6193

0 commit comments

Comments
 (0)