I'm running MAMP locally. I have a php script that I use to build a web site, to generate static HTML files, that I then push to a web server.
This process acts a lot like Jekyll on github pages.
For now, I simply make changes to Markdown files (my content) and then hit a local url, localhost/mysite/build, to which generates the html files. Simple.
I do have git installed locally to version the PHP script itself, along with the markdown files.
Ideally I would like to create a post-commit hook that will simply "ping" that build URL to allow it do run.
A couple things. I have been trying but the post-commit doesn't run the URL.
I would like to use PHP in the post-commit file, is that possible? I don't need any validation or anything yet, just simply want to call the URL to have the process run when I commit.
I have done the chmod to make sure the script is executable.
The post-commit file is named 'post-commit', no extension.
I would think I could just add one simple line, like a file_get_contents(myurl), or something close to that.
I have been googling for a few hours now and found things that are close but not exactly right. Its really very simple, just sort of a noob with git hooks.
Thanks.