From 873c8e87549b743c2353a7a54770c9dd137c2c52 Mon Sep 17 00:00:00 2001 From: Wei Ji Date: Sat, 12 Oct 2019 10:20:19 +1300 Subject: [PATCH 1/5] Continuous Documentation to Zeit Now Continuous documentation made on every push made to the repository. Sets up miniconda first, installs the necessary packages, builds the documentation pages and then deploys website to Zeit Now static site host. --- package.json | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 package.json diff --git a/package.json b/package.json new file mode 100644 index 00000000000..6a6321c90dc --- /dev/null +++ b/package.json @@ -0,0 +1,8 @@ +{ + "scripts": { + "build:miniconda": "curl -o ~/miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh && bash ~/miniconda.sh -b -p $HOME/miniconda", + "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", + "build:docs": "source activate pygmt && cd doc && make all && mv _build/html ../public", + "build": "export PATH=$HOME/miniconda/bin:$PATH && npm run build:miniconda && npm run build:pygmt && npm run build:docs" + } +} From 67bed1b451786d291a3953b94695af26e1f7fa59 Mon Sep 17 00:00:00 2001 From: Wei Ji Date: Sat, 12 Oct 2019 14:54:45 +1300 Subject: [PATCH 2/5] Silence 'Now for GitHub' and make build logs publicly accessible Refer to https://zeit.co/docs/v2/advanced/now-for-github/#disable-commenting-with-silent-mode and https://zeit.co/docs/configuration/#configuration/public --- now.json | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 now.json diff --git a/now.json b/now.json new file mode 100644 index 00000000000..af488297cc5 --- /dev/null +++ b/now.json @@ -0,0 +1,6 @@ +{ + "github": { + "silent": true + }, + "public": true +} From c1b528818a01574966912c478b05e0d01b884493 Mon Sep 17 00:00:00 2001 From: Wei Ji Date: Wed, 16 Oct 2019 00:27:39 +1300 Subject: [PATCH 3/5] Add inline comments to now.json and package.json --- now.json | 2 ++ package.json | 2 ++ 2 files changed, 4 insertions(+) diff --git a/now.json b/now.json index af488297cc5..5398d86b3ef 100644 --- a/now.json +++ b/now.json @@ -1,4 +1,6 @@ { + // Zeit Now for Github configuration that override default settings + // Documentation can be found at https://zeit.co/docs/configuration "github": { "silent": true }, diff --git a/package.json b/package.json index 6a6321c90dc..2c7f9448a04 100644 --- a/package.json +++ b/package.json @@ -1,4 +1,6 @@ { + // Script to deploy documentation to Zeit Now static site host + // Documentation at https://zeit.co/docs/v2/build-step/?query=package.json#defining-a-build-script "scripts": { "build:miniconda": "curl -o ~/miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh && bash ~/miniconda.sh -b -p $HOME/miniconda", "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", From 245df0f355dcf30a652027c754aee69a29ae2d39 Mon Sep 17 00:00:00 2001 From: Wei Ji Date: Wed, 16 Oct 2019 00:27:39 +1300 Subject: [PATCH 4/5] Revert "Add inline comments to now.json and package.json" This reverts commit c1b528818a01574966912c478b05e0d01b884493. --- now.json | 2 -- package.json | 2 -- 2 files changed, 4 deletions(-) diff --git a/now.json b/now.json index 5398d86b3ef..af488297cc5 100644 --- a/now.json +++ b/now.json @@ -1,6 +1,4 @@ { - // Zeit Now for Github configuration that override default settings - // Documentation can be found at https://zeit.co/docs/configuration "github": { "silent": true }, diff --git a/package.json b/package.json index 2c7f9448a04..6a6321c90dc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,4 @@ { - // Script to deploy documentation to Zeit Now static site host - // Documentation at https://zeit.co/docs/v2/build-step/?query=package.json#defining-a-build-script "scripts": { "build:miniconda": "curl -o ~/miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh && bash ~/miniconda.sh -b -p $HOME/miniconda", "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", From 1d30314be07740261d904e7882009d31d2d741f6 Mon Sep 17 00:00:00 2001 From: Wei Ji Date: Wed, 16 Oct 2019 00:55:10 +1300 Subject: [PATCH 5/5] Add section on Continuous Documentation to MAINTENANCE.md --- MAINTENANCE.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/MAINTENANCE.md b/MAINTENANCE.md index 1cafdac8f98..a679d93c93e 100644 --- a/MAINTENANCE.md +++ b/MAINTENANCE.md @@ -61,6 +61,15 @@ repository to avoid duplicating work across multiple repositories. If you find any problems with the test setup and deployment, please create issues and submit pull requests to that repository. +## Continuous Documentation + +We use the [Zeit Now for Github integration](https://zeit.co/github) to preview changes +made to our documentation website every time we make a commit in a pull request. +The integration service has a configuration file `now.json`, with a list of options to +change the default behaviour at https://zeit.co/docs/configuration. +The actual script `package.json` is used by Zeit Now to install the necessary packages, +build the documentation, copy the files to a 'public' folder and deploy that to the web, +see https://zeit.co/docs/v2/build-step/?query=package.json#defining-a-build-script. ## Making a Release