GitPeeks

Hooks

Use hooks to run custom scripts at specific deployment stages.

Hooks should be stored in the .gitpeeks/hooks folder.

Note: Scripts runs in the same environment as the deployment.

Environment variables

Environment variables available to the hooks command:

  • GITPEEKS_SERVICE_IDENTIFIER — The unique service identifier
  • GITPEEKS_PREVIEW_HOST — The unique preview host
  • GITPEEKS_PREVIEW_URL — The unique preview URL

Available hooks

Name the hook file exactly after the hook—without any file extension. For example, the pre-deploy hook should be named pre-deploy, not pre-deploy.sh. Make sure the file is executable.