How to automate the commands "git pull origin" and "npm run prod" when I merge to master branch?

Hello ,

When I merge my branch to the master branch I always do this on the server :

  • git pull origin
  • php artisan migrate
  • npm run prod

I’m wondering if there is a way , once I merge to master branch I can run the commands above automatically.

Thanks