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

jmacdiarmid's avatar

Deploying Laravel 8 App To a Shared Host using GitHub Actions

Please bear with me since I'm a noob on deploying websites with anything other than FTP. I have used Git hooks via ssh using shell scripts to pull code from GitHub when there is a change.

Before I get into more, I'll address the elephant in the room regarding installing Laravel on a shared host. Since this project is for a client with a limited budget and limited time, using the existing shared host is more of a "see if we can get it up and running, etc, then we'll consider moving it to a vpn".

Now, I'm in the process of learning deployment using Github Actions and if I'm being honest, from what I've seen and tested so far, it's friggin awesome. :) I started with this YT video Deploy To Shared Hosting With Github Actions. which describes a simple setting up using two deployment scripts, master.yml file and a staging.yml file in a .github/workflows directory path. This example just used a simple index.html page to illustrate how it all works.

While researching GitHub Actions further, I ran across this excellent article on How to create a CI/CD for a Laravel application using GitHub Actions which goes into much more details and provides an example deployment project and deployment scripts. Now, more toward the issue that I'm running into. I'm at the point in this tutorial where recommends installing the "deployer/deployer" and "deployer/recipes" composer packages. After installing them it gives me a couple of warnings that "deployer/recipes" and one of the dependencies "deployer/phar-update" are both abandoned and that it shouldn't be used. Furthermore, no replacement is suggested.

I know this was a bit long winded. But, since GitHub Actions is a relatively new tool released sometime around the mid 2020. I didn't see anything mentioned about it in the Laracast discussion, so I thought I should at least give an intro for this great tool (IMHO),

Also, I was curious if anyone has the deployer packages and run into the warnings I mentioned or if there are any alternatives to them since nothing was suggested by the deployer package developer.

Lastly, if anyone here, has used this tool in a deployment project, I would be very interested in any tips,

0 likes
2 replies
martinbean's avatar

@jmacdiarmid GitHub Actions is lovely. It’s nice to be able to open a pull request, see tests being ran, and then merging that PR and having it automatically deploy somewhere. However, I’ve not used GitHub Actions to do FTP-based deployments. I’ve not used FTP for a while!

If you’re just looking for something to deploy to a server after pushing to GitHub, then I can recommend DeployHQ. I’ve used it before for similar scenarios to yourself: clients with a limited budget or that have an existing shared host with nothing but FTP available as a deployment mechanism. DeployHQ has a free plan for one project. It also has the benefit that it can do build steps before transferring files, so if you’re using Mix then you can set up a build step to compile your assets before deploying. You can then set it up to automatically deploy when you push to your repository’s main branch.

jmacdiarmid's avatar

@martinbean Thank you for the info regarding DeployHQ. It sounds like a good alternative if I run into anything unexpected with GHA. As far as protocol, I'm planning to use ssh. I only used FTP on the sample project as a test. Also, I'm reading the article comments and apparently their have been some security issues that were addressed in October 2020.

Please or to participate in this conversation.