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

bnazarov's avatar

Build and Deploy workflow

It's a very general question and not very Laravel specific but I'm having hard time figuring what's the best way to handle it.

Until now I didn't use any build tools but I want to give CodeKit a chance.

So my workflow was: 1 - Work on local 2 - Push to git 3 - SSH into production machine 4 - Pull

Now with CodeKit I'm a bit confused. I decided to use the build folder approach. I moved all my js, css, img in Resources > Assets and when I build it, a Build folder is created in the root dir and all files are compiled and copied there.

And here I'm stuck with what is considered best approach to deploy?

Any help or learning resource is greatly appreciated.

0 likes
2 replies
ejdelmonico's avatar

Using Codekit may help you in the short term, but it will quickly become insufficient. I would take a day or two and get familiar with Webpack and its vast ecosystem. It will be around for a while and you can use it in any situation. Using CodeKit (which is a great product for a single dev with very small projects) is a very temporary fix and you may waste more time making it right than using standard tools.

sherwinmdev's avatar

@bnazarov@abv.bg "best approach" is the one that fits your needs/requirements.

here's is my workflow and it works with myself as a solo dev and as well as another project with 2 devs.

we have a local dev environment. we use git and do the usual feature branch thing. i use laravel forge to configure a server. in this server, i have a staging env and production. they are both on the same server so that the configurations are the same - less surprises. also, the requirements of the app are not high so i can get away with this set up.

in git repo, we also have a staging branch and master/production branch. once the feature branch is tested, we merge to staging branch. we log into the staging app and do a git pull and do testing. if all tests pass, we merge the staging branch to production/master.

we login to production and do a git pull. that's about it. now there is a bit of a down time but this particular project can have down times during our maintenance schedule. it's a bit of task but we have less issues that "fall through the cracks".

if you can't afford down time, you can do symbolic links and between current app directory to new directory that holds the new code. you can write a script that does that - or you can use laravel envoyer that does a great job at no down time deployment.

Please or to participate in this conversation.