Skip to content

Commit

Permalink
chore: auto-deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
boennemann committed Mar 10, 2016
1 parent e008f68 commit e7750d9
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 7 deletions.
14 changes: 14 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
language: node_js
node_js:
- 5
cache:
directories:
- node_modules
notifications:
email: false
deploy:
provider: script
script: npm run deploy
skip_cleanup: true
on:
branch: master
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# greenkeeper-website
[![Build Status](https://travis-ci.com/greenkeeperio/greenkeeper-website.svg?token=eXbhDbHCycbq8ZfsMAgq&branch=master)](https://travis-ci.com/greenkeeperio/greenkeeper-website)

This is a [harp.js](http://harpjs.com/) project. To run the server,

Expand Down
20 changes: 20 additions & 0 deletions deploy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
if (!process.env.GH_TOKEN) throw new Error('no token')

var url = require('url')
var path = require('path')

var pkg = require('./package.json')

var repo = url.parse(pkg.repository.url)
repo.auth = process.env.GH_TOKEN
repo = repo.format()

require('gh-pages').publish(path.join(__dirname, 'www'), {
repo: repo,
silent: true,
user: {
name: 'Greenkeeper',
email: 'support@greenkeeper.io'

}
}, console.log)
17 changes: 10 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
{
"name": "greenkeeper-website",
"description": "The Greenkeeper Website",
"private": true,
"scripts": {
"start": "harp server ./www",
"build": "harp compile ./app ./www"
"devDependencies": {
"gh-pages": "^0.11.0",
"harp": "^0.20.1"
},
"private": true,
"repository": {
"type": "git",
"url": "git+https://github.com/christophwitzko/greenkeeper-website.git"
"url": "https://github.com/greenkeeperio/greenkeeper-website.git"
},
"devDependencies": {
"harp": "^0.20.1"
"scripts": {
"build": "harp compile ./app ./www",
"deploy": "node deploy.js",
"start": "harp server ./www",
"test": "npm run build"
}
}

0 comments on commit e7750d9

Please sign in to comment.