Skip to content

Commit 15e8a91

Browse files
author
Kevin Paul
authored
Merge pull request #26 from jukent/popcontrib
Add Read the Docs autobuild to contributors guide
2 parents cf4c1ff + 1de5206 commit 15e8a91

File tree

2 files changed

+30
-15
lines changed

2 files changed

+30
-15
lines changed

CONTRIBUTING.md

+30-15
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,43 @@ For questions or anything else you would like to share with the [Project Pythia
1818

1919
The portal site is built with [Sphinx](https://www.sphinx-doc.org/).
2020

21-
To build and view the site locally (e.g. for testing new content),
22-
use [conda](https://docs.conda.io/) to set up a build environment with all dependencies:
21+
When testing new content is important to build and view the site. Read the Docs automatically builds the site for you when each Pull Request is checked. You can also build it locally on your machine.
22+
23+
### To view the Read the Docs autobuild
24+
25+
Once a Pull Request has passed all tests, including the Read the Docs build, you can click "Details" of the check that says, "docs/readthedocs.org:projectpythia - Read the Docs build succeeded!" to launch a new tab with a build of the Project Pythia site. (You may have to click "Show all checks" for this to be displayed.)
26+
27+
![Checks](../_static/images/ReadtheDocsAutobuild.png)
28+
29+
### To build and view the site locally
2330

2431
- Fork the [source repository](https://github.com/ProjectPythia/projectpythia.github.io) on GitHub
2532
- Make a local clone of the repository on your machine
33+
``` bash
34+
git clone git@github.com:USERNAME/projectpythia.github.io.git
35+
# or
36+
git clone https://github.com/USERNAME/projectpythia.github.io.git
37+
```
2638
- In your favorite terminal, navigate to the `content` directory of the source repository
39+
```bash
40+
cd projectpythia.github.io/content
41+
```
2742
- Use [conda](https://docs.conda.io/) to set up a build environment:
28-
```
29-
conda env create -f ../ci/environment.yml
30-
conda activate pythia
31-
```
43+
``` bash
44+
conda env create -f ../ci/environment.yml
45+
conda activate pythia
46+
```
3247
- Build the site locally using Sphinx (which you just installed in the `pythia` environment, along with all necessary dependencies):
33-
```
34-
make html
35-
```
48+
``` bash
49+
make html
50+
```
3651
- The newly rendered site is now available in `content/_build/html/index.html`.
3752
Open with your web browser, or from the terminal:
38-
```
39-
open _build/html/index.html
40-
```
53+
``` bash
54+
open _build/html/index.html
55+
```
4156
- When you're done, you can deactivate the dedicated build environment with
42-
```
43-
conda deactivate
44-
```
57+
``` bash
58+
conda deactivate
59+
```
4560
- You can re-activate the `pythia` conda environment at any time with `conda activate pythia`.
65.2 KB
Loading

0 commit comments

Comments
 (0)