Skip to content

A simple hook receiver to update a Lapis-powered website.

License

Notifications You must be signed in to change notification settings

lazuscripts/githook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

(Note: I'm going to rewrite this to explain how to use with locator, a simple server locator I designed for use with Lapis and these sub-applications.)

Dependencies:

  • Lapis (duh)
  • MoonScript
  • OpenResty user needs a bash shell (ch -s /bin/bash user)

From the shell:

git subtree add --prefix githook https://github.com/lazuscripts/githook.git master --squash

(--prefix specifies where it will be saved.)

Alternately, you can add it as a remote for easier maintenance:

git remote add -f githook https://github.com/lazuscripts/githook.git
git subtree add --prefix githook githook master --squash

From your main application class: @include "githook.githook" (or wherever you put it)

Updating

From the shell:

git subtree pull --prefix githook https://github.com/lazuscripts/githook.git master --squash

Or, if it is set up as remote:

git subtree pull --prefix githook githook master --squash

Config

All configuration is optional. Without configuration, will attempt to update any time it is visited.

  • githook_branch "branch" which branch you want updating (as string) (to prevent updates triggering when pushing unrelated branches)
  • githook_secret "secret" the secret string used on GitHub

Will attempt to checkout, pull, update submodules if needed, compile all code, then run migrations, and finally update the running server without interruption.

Returns a log along with exit codes on success or failure.

About

A simple hook receiver to update a Lapis-powered website.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published