Skip to content

Commit cdcdf70

Browse files
weiji14leouieda
authored andcommitted
Use Zeit Now to deploy doc builds from PRs (#344)
"Continuous documentation" on every push/PR made to the repository. Uses a npm `package.json` configuration to setup miniconda, install the necessary packages, build the documentation pages and then deploy. Add instructions to Maintenance Guide.
1 parent 91ff1c3 commit cdcdf70

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

MAINTENANCE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,15 @@ repository to avoid duplicating work across multiple repositories.
6161
If you find any problems with the test setup and deployment, please create issues and
6262
submit pull requests to that repository.
6363

64+
## Continuous Documentation
65+
66+
We use the [Zeit Now for Github integration](https://zeit.co/github) to preview changes
67+
made to our documentation website every time we make a commit in a pull request.
68+
The integration service has a configuration file `now.json`, with a list of options to
69+
change the default behaviour at https://zeit.co/docs/configuration.
70+
The actual script `package.json` is used by Zeit Now to install the necessary packages,
71+
build the documentation, copy the files to a 'public' folder and deploy that to the web,
72+
see https://zeit.co/docs/v2/build-step/?query=package.json#defining-a-build-script.
6473

6574
## Making a Release
6675

now.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"github": {
3+
"silent": true
4+
},
5+
"public": true
6+
}

package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"scripts": {
3+
"build:miniconda": "curl -o ~/miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh && bash ~/miniconda.sh -b -p $HOME/miniconda",
4+
"build:pygmt": "conda env create -f environment.yml && source activate pygmt && conda install -c conda-forge -c conda-forge/label/dev -y gmt==6.0.0rc4 && make install",
5+
"build:docs": "source activate pygmt && cd doc && make all && mv _build/html ../public",
6+
"build": "export PATH=$HOME/miniconda/bin:$PATH && npm run build:miniconda && npm run build:pygmt && npm run build:docs"
7+
}
8+
}

0 commit comments

Comments
 (0)