Coder Social home page Coder Social logo

ci-ninja's Introduction

ci-ninja

CI service written in node, inspired by node-cd

Usage

  1. git clone https://github.com/backmeupplz/ci-ninja on the server
  2. Add scripts with the name like {repository-name}-master.sh to scripts
  3. Make sure the files are executable (like sudo chmod +x {repository-name}-master.sh)
  4. Add Webhook from your GitHub repository to http://{server-ip}:61439/

Aaaaand you're done.

Samples

memcoin-master.sh

My sample deploy script that I put on the server in scripts folder.

systemctl stop memecoin
cd /home/memcoin
rm -rf node_modules
git reset --hard
git pull
yarn install
systemctl start memecoin
curl 'https://api.telegram.org/bot1234/sendMessage?chat_id=76104711&text=%E2%9C%85%20memecoin%20has%20been%20successfully%20deployed!'

ci-ninja.service

My sample systemd service for ubuntu to run ci-ninja

[Unit]
Description=Service to start ci-ninja
After=network.target

[Service]
WorkingDirectory=/home/ci-ninja
ExecStart=/usr/bin/node /home/ci-ninja/index.js

[Install]
WantedBy=multi-user.target

memecoin.service

My sample systemd service for the Telegram bots

[Unit]
Description=Service to start memecoin Telegram bot
After=mongodb.service

[Service]
WorkingDirectory=/home/memcoin
ExecStart=/usr/bin/yarn distribute
Restart=always
RestartSec=3

[Install]
WantedBy=multi-user.target

License

MIT โ€” use for any purpose. Would be great if you could leave a note about the original developers. Thanks!

ci-ninja's People

Contributors

backmeupplz avatar dependabot[bot] avatar semcha avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.