Skip to content

Instantly share code, notes, and snippets.

View quinncomendant's full-sized avatar

Quinn Comendant quinncomendant

View GitHub Profile
@quinncomendant
quinncomendant / post-receive
Last active May 13, 2023 05:14
Use this script as `deploy.git/hooks/post-receive` in a bare git repo (`git init --bare`) on a server to deploy application files with, e.g., `git push deploy-production main`.
#!/usr/bin/env bash
#
# git post-receive hook to deploy releases via git push.
#
# @see https://gist.github.com/quinncomendant/6605356f8e5db92e657902303f10aaf3
# @author Quinn Comendant <quinn@strangecode.com>
# @version 2023-05-12
# Config
sitedir="/path/to/deploy/location";