https://github.com/tableflip/tabs
:hammer: TABLEFLIP Automated Build System
https://github.com/tableflip/tabs
Last synced: about 1 year ago
JSON representation
:hammer: TABLEFLIP Automated Build System
- Host: GitHub
- URL: https://github.com/tableflip/tabs
- Owner: tableflip
- Created: 2016-02-29T15:47:53.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-11-10T11:25:55.000Z (over 8 years ago)
- Last Synced: 2025-02-15T12:46:45.161Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 140 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TABS
TABLEFLIP Automated Build System.
## Getting started
1. Install Node.js
2. Install dependencies `npm install`
3. (Optional) Add TABS config file `.tabsrc` (defaults below):
```js
{
webhook: {
path: '/webhook',
secret: '(╯°□°)╯︵TABLEFLIP',
port: 7777
},
build: {
dir: './build'
}
}
```
4. Start the webhook `npm start`
## Configure a site to be built
1. Navigate to **Settings** for the repo
2. In **Collaborators**, add `tableflip-tabs` as a collaborator with **write** access
3. in **Webhooks & services** add a new webhook with the following info:
* Payload URL: `http://tabs.tableflip.io:7777/webhook`
* Content type: `application/json`
* Secret: **Retrieve from secrets.yaml for tabs-infrastructure project**
## Programmatic usage
**build.js**
```js
const build = require('./build')
const repo = 'git@github.com:tableflip/tableflip-www.git'
const commit = 'a0342ede2ea56c799d8ad40937267ba2875e9d88'
const opts = {stdout: process.stdout, stderr: process.stderr}
build(repo, commit, opts, (err, info) => {
console.log(`Built in ${info.dir}`)
})
```
**deploy.js**
```js
const deploy = require('./deploy')
const dir = '/path/to/built/tableflip-www'
const repo = 'https://github.com/tableflip/tableflip-www.git'
const opts = {stdout: process.stdout, stderr: process.stderr}
// Deploy built `dir` to `repo` on `branch`
deploy(dir, repo, 'gh-pages', opts, (err) => {
console.log(`Deployed`)
})
```