Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


Auto-deploy is a web application written in Go that facilitates deployment via git web hooks.

Given a configuration file that contains project root folders and scripts, auto-deploy creates custom urls (web hooks). These web hooks can be configured to be called by any git repository management system (github, gitlab, etc). Upon invocation of the web hook, the projects deployment script is executed (as defined in the configuration).

Note that the deployment script is something that is provided by you and is thus not restricted to doing deployment, it can do whatever you'd like it to do. Auto-deploy can be thought of as a poor man's continuous deployment (CD) tool and was, in fact created in order to not have to run a heavy CI/CD installation in order to be able to use web hooks.

See the installation section for an example configuration and deployment script.


Installation is as simple as compiling the binary (auto-deploy.exec) by running make build in the root folder. Thereafter either copy config-sample.json to config.json and update the contents as required before executing the binary.



Note that this deployment script assumes that the project git repository is also cloned on the production server.



Require Go >=1.12.1 installed with GVM, also see [TODO](connecting to an oracle database using Go):

  • make deps : get all dependencies, uses go modules to get exact dependencies.
  • make run : compile and execute
  • make test : run all tests
  • make test-unit : run unit tests
  • make test-integration : run integration tests

See Makefile for more options.

To get a development server up and running, we require ag (sudo apt install silversearcher-ag) and entr ( Run from the root folder to start a nodemon like process that restarts itself if any changes are detected to go code.

Testing Webhooks

The current webhook api is available under /api/webhooks/:project-slug/:scm-type.

Note you can use to obtain a public url which can be used for testing webhooks, e.g.: ssh -R 80:localhost:9111 where 9111 is the configured port number. The final url will then look something like:

Alternatively, if you have access to a VPS with a domain you can roll your own ngrok in 15 minutes. The following is a summary of the article using nginx running on a debian-based linux machine:

upstream tunnel {

server {
  location / {
    proxy_set_header  X-Real-IP  $remote_addr;
    proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header  Host $http_host;
    proxy_redirect off;

    proxy_pass http://tunnel;

Create an A record for to point to your machine and then run sudo certbot --nginx -d to get https setup.

Finally run ssh -R 8888:localhost:9111 where 9111 is the local service port. Your local service should now be accessible via

Managing dependencies

Dependencies are stored under $GOPATH/pkg/mod.

  • go mod tidy
  • go mod vendor


No description, website, or topics provided.




No packages published