Title: Git hook — deploy your site on every git push | harvis.dev
Open Graph Title: harvis.dev — deploy any folder with one command
X Title: harvis.dev — deploy any folder with one command
Description: Two lines in the root of your repo and every git push publishes your site. A pre-push hook runs the harvis CLI for you — build folders, branch guards, and how to share it with your team.
Open Graph Description: Run npx harvis in any folder and get a live URL in about two seconds. No account, no config, no build pipeline — plus an HTTP API and an MCP server for agents.
X Description: Run npx harvis in any folder and get a live URL in about two seconds. No account, no config, no build pipeline — plus an HTTP API and an MCP server for agents.
Opengraph URL: https://harvis.dev
Domain: harvis.dev
{"@context":"https://schema.org","@type":"FAQPage","mainEntity":[{"@type":"Question","name":"Should I use pre-push or post-commit?","acceptedAnswer":{"@type":"Answer","text":"pre-push is the sane default: it runs once per push, so an afternoon of five commits is one deploy rather than five. Use post-commit if you want every single commit live, or post-merge if you want a teammate's changes to publish when you pull them."}},{"@type":"Question","name":"Does it upload my .git folder or node_modules?","acceptedAnswer":{"@type":"Answer","text":"No. Anything starting with a dot — .git, .env, .github — plus node_modules and OS junk files are skipped on every deploy, hook or not. Your source files are uploaded though, so if the repo holds more than the site, point the hook at the build folder instead of the dot."}},{"@type":"Question","name":"Do I need an account for this?","acceptedAnswer":{"@type":"Answer","text":"No. Deploys are anonymous and the hook works the same either way. But an unclaimed site expires 24 hours after its last deploy, so if this site is meant to stay online, open the claim link from the first deploy and sign in once."}},{"@type":"Question","name":"How do I give the hook to the rest of the team?","acceptedAnswer":{"@type":"Answer","text":"Commit the script as .githooks/pre-push and have everyone run \"git config core.hooksPath .githooks\" after cloning. Git will not enable hooks from a repo on its own — that would let a clone run code on your machine — so that one command per person is unavoidable."}},{"@type":"Question","name":"Can I deploy from CI instead of from my laptop?","acceptedAnswer":{"@type":"Answer","text":"Yes, and for a shared project that is usually the better answer. Put the site's deploy token in your CI environment as HARVIS_DEPLOY_TOKEN and run \"harvis deploy dist\" from the pipeline; there is a GitHub Action that wraps the same thing. A git hook is the version that needs nothing but your own machine."}},{"@type":"Question","name":"Can I use npx in the hook instead of installing the CLI?","acceptedAnswer":{"@type":"Answer","text":"\"npx harvis deploy .\" works, but it resolves the package on every push and needs Node on the hook's PATH, which is exactly where desktop git clients fall over. A global install makes the hook faster and less fragile."}},{"@type":"Question","name":"How do I remove the hook?","acceptedAnswer":{"@type":"Answer","text":"Delete the file: \"rm .git/hooks/pre-push\". Nothing else changes — the site stays online and you can keep deploying by running the CLI yourself."}}]}
| theme-color | #F6F7EE |
| color-scheme | light dark |
| og:site_name | harvis.dev |
| og:image | https://harvis.dev/og-image.png |
| og:image:width | 1200 |
| og:image:height | 630 |
| og:image:alt | The harvis wordmark above the headline "Deploy a folder of static files with one command." and a terminal showing npx harvis printing a live URL. |
| og:type | website |
| twitter:card | summary_large_image |
| twitter:image | https://harvis.dev/og-image.png |
| twitter:image:alt | The harvis wordmark above the headline "Deploy a folder of static files with one command." and a terminal showing npx harvis printing a live URL. |
| twitter:image:width | 1200 |
| twitter:image:height | 630 |
Links:
Viewport: width=device-width, initial-scale=1