If you've got a Raspberry Pi and have built your self a Deployer6000 look no futher ! This code will deploy your project.
Things you need to do to get this running for your project:
- Raspberry PI
- Button and a switch
- Some LEDs
- Wire it all up correctly.
- create a deploy script and name it
deploy.sh
and keep it in the root of this folder - set URL to codeship build status badge as
PROJECT_URL
in your env variable on the Raspberry PI
- run
node index.js
(I recomend using forever to run this script forever) - Arm the deployer (flip the switch) and press deploy once the light is green.
Here is a picture of my deployer:
This is how I wired up the switches and lights using Raspberry PI gen2:
SWITCH_PIN = PIN_3
DEPLOY_BUTTON_PIN = PIN_5
RED_LIGHT_PIN = PIN_11
YELLOW_LIGHT_PIN = PIN_13
GREEN_LIGHT_PIN = PIN_12
If you intend to use any other pin # just set the correct pin # in index.js
and lights.js