box: node:4.2.6

# Run tests on all pull requests and branches
build:
  steps:
    - npm-install
    - script:
        name: build production assets
        code: npm run build
    - npm-test
    - script:
        name: build static pattern library
        code: |-
          export NODE_ENV=production
          export STYLEGUIDE_PORT=8000
          npm run styleguide &
          sleep 5 # let Node start up!
          wget -mpc --user-agent="" -e robots=off -P build -nH http://localhost:${STYLEGUIDE_PORT}/

# Automatically deploy `dev` branch to Github pages
deploy:
  steps:
    - lukevivier/gh-pages:
        token: $GH_TOKEN
        domain: forge.dosomething.org
        basedir: build

box: node:4.2.6

# Run tests on all pull requests and branches
build:
  steps:
    - npm-install
    - script:
        name: build production assets
        code: npm run build
    - npm-test
    - script:
        name: build static pattern library
        code: |-
          export NODE_ENV=production
          export STYLEGUIDE_PORT=8000
          npm run styleguide &
          sleep 10 # let Node start up!
          wget -mpc --user-agent="" -e robots=off -P build -nH http://localhost:${STYLEGUIDE_PORT}/

# Automatically deploy `dev` branch to Github pages
deploy:
  steps:
    - lukevivier/gh-pages:
        token: $GH_TOKEN
        domain: forge.dosomething.org
        basedir: build

Increase "timeout" waiting for styleguide to start up.
Increase "timeout" waiting for styleguide to start up.
