aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Hand <joe@joeahand.com>2017-02-03 13:41:10 -0800
committerGitHub <noreply@github.com>2017-02-03 13:41:10 -0800
commitdfeeb335f801ba0cf99a3463af9be6b009e857dc (patch)
treed5736250249e441b8579e9729de8a6a0966b4dec
parent55452e22d4bbbb9dd11d296773e5801870b15bf0 (diff)
downloaddat-docs-dfeeb335f801ba0cf99a3463af9be6b009e857dc.tar.gz
dat-docs-dfeeb335f801ba0cf99a3463af9be6b009e857dc.zip
Netlify deployment (#39)
* add netlify * add netlify script * update netlify script * remove travis stuff * add docs on netlify
-rw-r--r--.travis.yml27
-rw-r--r--README.md19
-rw-r--r--package.json4
-rw-r--r--scripts/netlify.sh9
4 files changed, 28 insertions, 31 deletions
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 9c03b91..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,27 +0,0 @@
-language: node_js
-node_js:
- - stable
-
-branches:
- only:
- - master
-
-before_script:
- - git config --global user.email "robot@overlord.industries"
- - git config --global user.name "Travis CI"
- - git remote rm origin
- - git remote add origin https://joehand:${GH_TOKEN}@github.com/datproject/docs.git
-
-env:
- global:
- - secure: encrypted-github-token
- - secure: >-
- b5NkZvr5v6+ROP2fxPV2NkkoXd5WAcaghTJHWEPINGW7fmeiHg8Qz4vmQy7i/rulsbgtpmnHYmx89yiHR+HTaZTWxqoUe0Ju6D5SLEzBB2dYtFi3X9sTfr3wEkyX8xF+4IFT9Rkv+8TsSj/jAOk7t49Gq0fAWRZTcZOfWL4LTzCgVwQG6QGBoYT7LB2FrbdfyqlwCkKBu2bCtc0bMcBRAMbcFDPOHcK+yAZGh7vs9NE9C7b0DdZLyzeigZ0loRqCTVa7SMXbFwj2tjhmKBXgFFKykIxq/fppsr2+QVDvFbe6MeKZArKapTSIiiHv6LSW3Uqrsh6vpjnlJz/VFPP6H03AM4IxhDzG7qAeBaa3OxXi1GWl4/gBcf4TlYmBksSTYv3WGh36oIPVpRBNDSbJ3pcvOP6cfbUegub/8zn8uxlZJ+g+YZyqxAn8CIgIpVXjJRyVBaIg9wB5XkmDfQYWANtQtphbUQBjitGxEBcSnFmRyl2Cb/9fJ2bzS/l21gQ/DTTs4hhzxGrWK1uLOmXCYz4r1uswvE8yXVauJTqtssMtLEDzAld1Db+nSo1ALMxtrO6EBNy+7g+86Tkonz4J/dPsyJIXqoQVcTRFr+Xu/ThNs20JBWEGE6VxBLew1mIRBLGf0v+onTvWvyWUTtHXnomTJRA9fJRaVYTSBE/BhYs=
-
-install:
- - npm install
-
-deploy:
- provider: script
- script: npm run travis:update && npm run deploy
- skip_cleanup: true
diff --git a/README.md b/README.md
index b7cff4c..36e5542 100644
--- a/README.md
+++ b/README.md
@@ -24,13 +24,28 @@ This documentation uses [minidocs](https://github.com/freeman-lab/minidocs) for
### Deployment
-Deployment happens automatically via Travis when updates are pushed to the master branch.
+This repository uses [netlify](https://www.netlify.com/) for deployment. Deployment will happen automatically.
+
+It works this way:
+
+* Git webhook tells netlify there is new content
+* netlify pulls latest repo
+* netlify automatically runs `npm install`
+* netlify runs the build script `sh scripts/netlify.sh`, which:
+ * sets git config so we can use `ecosystem-docs` and pull latests readme files
+ * runs `npm run netlify` which updates remote repos and builds.
+* deploys `/dist` to the web
### NPM Commands
-* `npm start`: start budo server to view locally
+#### Local Docs Preview:
+
* `npm update`: update external module readme files
* `npm run build:local`: build app & css for local viewing
+* `npm start`: start budo server to view locally
+
+#### Other commands:
+
* `npm run build:css`: build css, runs with both build commands
* `npm run watch:css`: watch css live and build:local with changes
* `npm run paper`: create the paper with pandoc
diff --git a/package.json b/package.json
index 9f37374..7a229f1 100644
--- a/package.json
+++ b/package.json
@@ -4,15 +4,15 @@
"description": "Documentation for Dat and the surrounding ecosystem.",
"main": "index.js",
"scripts": {
- "travis:update": "npm run update:list && cat repos.txt | ecosystem-docs sync -t ${GH_TOKEN} && cat repos.txt | ecosystem-docs read -t ${GH_TOKEN} | node scripts/build.js",
+ "update:token": "npm run update:list && cat repos.txt | ecosystem-docs sync -t ${GH_TOKEN} && cat repos.txt | ecosystem-docs read -t ${GH_TOKEN} | node scripts/build.js",
"update": "npm run update:list && npm run update:build",
"update:list": "curl -Ssl https://raw.githubusercontent.com/datproject/awesome-dat/master/readme.md | grep '📔' | egrep -o 'github.com/[a-zA-Z0-9_-]+/[a-zA-Z0-9_-]+' | cut -f 2- -d / | uniq > repos.txt",
"update:build": "cat repos.txt | ecosystem-docs sync && cat repos.txt | ecosystem-docs read | node scripts/build.js",
"build:local": "npm run build:css && minidocs docs -c docs/contents.json -i dat -o dist -l ./node_modules/dat-design/public/img/dat-data-logo.svg -t 'Dat Data' -s assets/styles.css --pushstate",
"build:deploy": "npm run build:css && minidocs docs -c docs/contents.json -i dat -o dist -l ./node_modules/dat-design/public/img/dat-data-logo.svg -t 'Dat Data' -s assets/styles.css --full-html",
"build:css": "node-sass --importer node_modules/node-sass-magic-importer assets/styles.scss assets/styles.css",
- "deploy": "npm run build:deploy && echo docs.datproject.org > dist/CNAME && gh-pages -d dist",
"watch:css": "nodemon -e scss -x \"npm run build:local\"",
+ "netlify": "npm run update:token && npm run build:deploy",
"start": "budo --dir dist --pushstate",
"paper": "cd papers && pandoc --variable author=\"Maxwell Ogden, Karissa McKelvey, Mathias Buus\" --variable title=\"Dat - Distributed Dataset Synchronization And Versioning\" --variable date=\"UNFINISHED, November 2016\" --variable classoption=twocolumn --variable papersize=a4paper -s dat-paper.md -o dat-paper.pdf"
},
diff --git a/scripts/netlify.sh b/scripts/netlify.sh
new file mode 100644
index 0000000..783b9c3
--- /dev/null
+++ b/scripts/netlify.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+echo "Setting Git Stuff"
+# Need this for ecosystem-docs
+git config --global user.email "robot@overlord.industries"
+git config --global user.name "Netlify"
+
+echo "Running npm netlify"
+npm run netlify \ No newline at end of file