Skip to content

Instantly share code, notes, and snippets.

@Bachsau
Last active March 13, 2023 10:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Bachsau/8d28aa3e02034090b382673e8125a883 to your computer and use it in GitHub Desktop.
Save Bachsau/8d28aa3e02034090b382673e8125a883 to your computer and use it in GitHub Desktop.
The simplest of Git deployment scripts: Just ping it!
#!/bin/sh -eu
while read -r discard; do :; done; unset -v discard
echo 'Content-Type: text/plain; charset=UTF-8'
echo 'Cache-Control: no-store, max-age=0'
echo
git fetch -q github main
git reset --hard github/main
git clean -d -e '/deploy.cgi' -x
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = false
[remote "github"]
url = https://github.example/YoMama/Fat.git
fetch = +refs/heads/*:refs/remotes/github/*
[clean]
requireForce = false
@Bachsau
Copy link
Author

Bachsau commented Mar 13, 2023

I'm actually using a more cryptic file name so people can't hammer it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment