Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

deansatch's avatar

Which deployment hooks?

I have a site which I would normally run npm run production on before pushing to github. Is this still the way I should do it when using envoyer or should I have that as a webhook instead and never run that command locally?

Also, just wondering which cache:clear and xyz:cache commands I should or shouldn't run as webhooks.

e.g. I was thinking of setting up 4 more webhooks to do:

#1
php artisan cache:clear

#2
php artisan config:cache

#3
php artisan route:cache

#4
php artisan view:clear



Any thoughts on this?

0 likes
3 replies
Jaytee's avatar

No need for webhooks. Webhooks are usually used to notify another application of an event that was triggered, and pass a payload.

Some people compile locally and then push to github, and some people compile on the server. I usually compile on the server.

Run the commands yourself via the CLI.

deansatch's avatar

sorry..."deployment" hooks. Not webhooks.

Jaytee's avatar

Ahh. I can't help you there, never used Envoyer, and don't have an account for it.

Sorry.

Please or to participate in this conversation.