Skip to content
This repository has been archived by the owner on Sep 9, 2023. It is now read-only.

Commit

Permalink
Build docs automatically (#3)
Browse files Browse the repository at this point in the history
Builds docs automatically in travis on pushes to `master`
  • Loading branch information
tkuminecz committed Dec 20, 2016
1 parent f78b9a2 commit 892d86f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.nyc_output
coverage
docs
lib
node_modules
npm-debug.log
Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ node_js:
- '6.0'
- '5.0'
- '4.0'
cache: yarn
script:
- npm run flow && npm run test:coverage:coveralls
after_success:
Expand Down
22 changes: 11 additions & 11 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ fi

rev=$(git rev-parse --short HEAD)

# build docs
npm run docs

cd docs
mkdir docs
cd docs/

git init
git config user.name "Tim Kuminecz"
git config user.email "tkuminecz@gmail.com"

git remote add upstream "https://$GH_TOKEN@github.com/tkuminecz/phantasy.git"
git fetch upstream
git reset upstream/gh-pages
git remote add origin "https://$GH_TOKEN@github.com/tkuminecz/phantasy.git"
git fetch origin
git checkout -b gh-pages origin/gh-pages

touch .
# build docs
cd ..
npm run docs
cd docs/

git add -A .
git commit -m "rebuild pages at ${rev}"
git push -q upstream HEAD:gh-pages
git commit -am "rebuilding pages @ ${rev}"
git push origin gh-pages
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "phantasy",
"version": "0.10.3",
"version": "0.10.4",
"description": "",
"author": "Tim Kuminecz <tkuminecz@gmail.com>",
"license": "MIT",
Expand Down Expand Up @@ -30,9 +30,7 @@
},
"scripts": {
"build": "make clean && make",
"docs": "npm-run-all docs:*",
"docs:html": "documentation build src/** --name $npm_package_name --project-version $npm_package_version -f html -o docs",
"docs:md": "documentation build src/** -f md -o docs/api.md",
"docs": "documentation build src/** --name $npm_package_name --project-version $npm_package_version -f html -o docs",
"flow": "flow",
"test:tap": "BABEL_ENV=test babel-tape-runner $(\\find test | \\grep \\.js)",
"test": "npm run test:tap | tap-diff",
Expand Down

0 comments on commit 892d86f

Please sign in to comment.