Effortless Continuous Deployment for Laravel with GitHub Actions

  Рет қаралды 6,018

Glenn Raya

Glenn Raya

Күн бұрын

Пікірлер: 88
@itsTarik
@itsTarik 4 ай бұрын
Bro, you won't believe how well timed this video is. Thank you.
@glennraya
@glennraya 4 ай бұрын
You're welcome!
@SairilSeberiaga
@SairilSeberiaga 4 ай бұрын
Concise and direct. What you want, is what you get. Great work Glenn. Hope to see more videos!
@glennraya
@glennraya 4 ай бұрын
Thank you! 🙏🏼
@AdamFotheringham
@AdamFotheringham 2 ай бұрын
This is so well explained, I'll be keeping an eye out for more of your content. Thank you!
@glennraya
@glennraya 2 ай бұрын
@@AdamFotheringham Thank you. Got so busy with work, wasn't able to put out new content in a while.
@allv16
@allv16 2 ай бұрын
Great Video! Super clean explaination. You deserve more likes!
@glennraya
@glennraya 2 ай бұрын
Thank you!
@codewithsub5083
@codewithsub5083 4 ай бұрын
As always, to the point and very good explanation. Thank you so much
@glennraya
@glennraya 4 ай бұрын
@@codewithsub5083 thank you! 🙏
@HannashGt
@HannashGt Ай бұрын
So clean and well explained ❤
@glennraya
@glennraya Ай бұрын
Thank you!
@chhirag
@chhirag 4 ай бұрын
Very good quality. Thank you for the great content.
@glennraya
@glennraya 4 ай бұрын
Thank you! 🙏🏼
@mobythereal
@mobythereal 4 ай бұрын
This is amazing! we need a part two where we setup the queue supervisor and setup the database on the vps server
@glennraya
@glennraya 4 ай бұрын
Thanks, I'm working on a followup - creating the VPS server from scratch with ssh login, installing nginx, php, etc.
@bajuhitam1005
@bajuhitam1005 4 ай бұрын
@@glennraya great! im waiting for it
@batsmanist
@batsmanist 4 ай бұрын
Excellent tutotial
@grzesiekb9142
@grzesiekb9142 Ай бұрын
Great video. TY 🍺
@glennraya
@glennraya Ай бұрын
@@grzesiekb9142 Thanks, you’re welcome. You might need to switch to the latest version of easingthemes to properly sync files.
@umaroladipo2811
@umaroladipo2811 4 ай бұрын
Great work. As an extra protection layer, I'll suggest putting the app in maintenance mode "php artisan down" before running migrations and other commands.
@glennraya
@glennraya 4 ай бұрын
@@umaroladipo2811 good suggestion. Thanks
@ibrownlad
@ibrownlad 4 ай бұрын
Explained everything so well
@glennraya
@glennraya 4 ай бұрын
@@ibrownlad thank you 🙏
@shahiqzaidi
@shahiqzaidi 4 ай бұрын
Excellent video. Subscribed.
@glennraya
@glennraya 4 ай бұрын
Thank you!
@isslemcookie5795
@isslemcookie5795 4 ай бұрын
Thank you for the great content
@glennraya
@glennraya 4 ай бұрын
@@isslemcookie5795 thank you!
@m4rkbello
@m4rkbello 4 ай бұрын
Thankyou for this kuya, pagpatuloy mo lang kuya always support
@glennraya
@glennraya 4 ай бұрын
Thank you!
@wormy_coder
@wormy_coder 4 ай бұрын
I like your videos, ❤❤ please keep it up
@glennraya
@glennraya 4 ай бұрын
@@wormy_coder thank you 🙏
@marcoa.ramirez5752
@marcoa.ramirez5752 4 ай бұрын
Another amazing video 🔥
@glennraya
@glennraya 4 ай бұрын
@@marcoa.ramirez5752 thank you! 🙏
@kaiserdianalan7059
@kaiserdianalan7059 4 ай бұрын
THANK YOU!
@ergurkha3157
@ergurkha3157 3 ай бұрын
Espectacular
@devdude7607
@devdude7607 3 ай бұрын
Hell yeah! Keep'em coming. Can you shoot me some good resources to learn github CI/CD and deploying a Laravel sail project?
@glennraya
@glennraya 3 ай бұрын
Right now, I don't know any resources to deploy Laravel Sail with CI/CD.
@JamesJosephFinn
@JamesJosephFinn 4 ай бұрын
Great training! What’s your terminal setup?
@glennraya
@glennraya 4 ай бұрын
Thanks, that's the Warp terminal configured with Starship instead of Powerlevel10k.
@JamesJosephFinn
@JamesJosephFinn 4 ай бұрын
@@glennraya I keep seeing a lot of negative pushback on Warp regarding their mandatory login to send telemetry back to their servers. Is this a security concern in your eyes?
@glennraya
@glennraya 4 ай бұрын
@@JamesJosephFinn Yes Warp has mandatory login, I personally don't have problems with it, and with regards to telemetry, I'm not sure if I can turn that off to be honest.
@devhammed
@devhammed 4 ай бұрын
Nice video! But you should use "npm ci" install of "npm install" when using CI/CD, it will be faster because it won't be installing development dependencies which are not needed and will also be strict on lockfile.
@glennraya
@glennraya 4 ай бұрын
Yeah, you're right, I forgot that. Thanks for pointing that out.
@imrjat
@imrjat Ай бұрын
Bro bro bro, ❤❤
@JAOcero
@JAOcero 4 ай бұрын
Damnnn another learnings. Thanks master!
@cubedev4838
@cubedev4838 2 ай бұрын
How to setup dev, staging and prod?
@walidlaggoune9678
@walidlaggoune9678 4 ай бұрын
Amazing , can you do another tuto when testing the laravel application before pushing to the server ? and how to handle .env file
@glennraya
@glennraya 4 ай бұрын
You can try this: jobs: test: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v3 - name: Set up PHP uses: shivammathur/setup-php@v2 with: php-version: 8.3 - name: Install Composer dependencies run: composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader - name: Run tests run: php artisan test deploy: runs-on: ubuntu-latest needs: test # Ensure this job only runs if the test job succeeds
@siyabdev
@siyabdev 4 ай бұрын
What if we change our local repo and install some new dependencies, how would that take effect in production as composer install doesn't run on VPS
@glennraya
@glennraya 4 ай бұрын
Yes, all your npm/composer dependencies will be updated on GitHub's runner and will be synched to your server everytime the deploy script runs. Just make sure to test your project locally first by updating/installing new dependencies locally. The npm install/composer install command on the deploy script will always pull the latest version of the dependencies to sync.
@alexanderrossi7490
@alexanderrossi7490 4 ай бұрын
Thanks for the video quick question does this script also setup nginx ?
@glennraya
@glennraya 4 ай бұрын
No, Nginx should be set up in the server itself.
@emorejo46
@emorejo46 4 ай бұрын
astig boss.. ang galing mo talaga :)
@glennraya
@glennraya 4 ай бұрын
Thanks po. 🙏🏼
@codewithsub5083
@codewithsub5083 4 ай бұрын
With this workflow setup, I also want to run my test cases. How to set that up? Thank you
@glennraya
@glennraya 4 ай бұрын
You can try to have a job named "test:", then on the "deploy:" steps, you can use the "needs:" to run the test, this will not deploy to production when test cases fails. It will only deploy when all test passes. NOTE: Test this script first. jobs: test: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v3 - name: Set up PHP uses: shivammathur/setup-php@v2 with: php-version: 8.3 - name: Install Composer dependencies run: composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader - name: Run tests run: php artisan test deploy: runs-on: ubuntu-latest needs: test # Ensure this job only runs if the test job succeeds
@codewithsub5083
@codewithsub5083 4 ай бұрын
@@glennraya thank you so much
@sorantaha761
@sorantaha761 2 ай бұрын
what will change if the server is shared hosting instead VPS ? is there a way for shared hosting?
@glennraya
@glennraya 2 ай бұрын
@@sorantaha761 For as long as you got root access on a shared server, can run commands with sudo, it would work.
@rondevPH
@rondevPH 4 ай бұрын
Nice video. Can you share also how to run jobs on live server?
@glennraya
@glennraya 4 ай бұрын
Thank you, running queue jobs on live server is almost the same as running it locally, the only difference is on the live server you need to configure supervisor, to automatically restart the workers when the server reboots so you don't have to manually start them again.
@user-xg4rm3ww3o
@user-xg4rm3ww3o 4 ай бұрын
plz make a video to setup same to same vs code them which you are using now. need same to same i am not alone my most of friends need to this
@glennraya
@glennraya 4 ай бұрын
If you're referring to my VS Code setup, I already made a customization video: kzbin.info/www/bejne/b5CsYZWviLaiedU
@mahavishnu9312
@mahavishnu9312 4 ай бұрын
Hello brother can you make tutorial DigitalOcean server setup for Laravel tools, redis, mysql, node, horizon, queues, schedule, etc. Kubernetes with docker container setup Github actions possibleahh?. But I'm used laravel forge that platform do my all deployment stuff.
@glennraya
@glennraya 4 ай бұрын
I was thinking about including the Digital Ocean server thing in this video, but I cut it out, first to make it shorter, second, I thought intermediate users probably knew that already so I cut it out. With regards to Kubernetes, I'm not knowledgeable enough on that topic.
@kalenzo78
@kalenzo78 4 ай бұрын
@@glennraya can you make another video showing that ''cut-out digital ocean vps deploy please''
@glennraya
@glennraya 4 ай бұрын
@@kalenzo78 I'll consider it. The cut-outs are short now, and deleted already. 😆 But I'll think about it.
@imsaeedsaeedi
@imsaeedsaeedi 4 ай бұрын
How did you managed .env files?
@glennraya
@glennraya 4 ай бұрын
@@imsaeedsaeedi you have to set it up manually from your server, at least that’s what I do since there are potential security issues involved when some important configs are exposed. Although you can manage it as well from this kind of setup.
@pfuhad3760
@pfuhad3760 2 ай бұрын
Thank you so much. But some files are not being pushed to the server even though it is in github repo, Fixed Thank you
@glennraya
@glennraya 2 ай бұрын
I don't know about your case and what files you're trying to push to your server, but in my example, I'm only building the composer, and npm dependencies from GitHub and then pushing those to the production server instead of doing all of those resource-intensive tasks your own server.
@pfuhad3760
@pfuhad3760 2 ай бұрын
@@glennraya Thank you so much. Your videos are very helpful . Thank you . Fixed my issue I set public dir instead of root directory in yaml file.
@jopaymaymay
@jopaymaymay 3 ай бұрын
Galing! :)
@johnpaulinhog462
@johnpaulinhog462 4 ай бұрын
Is this possible on a hosting plan like hostinger?
@glennraya
@glennraya 4 ай бұрын
Yes it's possible, so long as GitHub's runner can access your server.
@johnpaulinhog462
@johnpaulinhog462 4 ай бұрын
@@glennraya Thanks for the reply, hoping for a separate tutorial for it ✌️
@glennraya
@glennraya 4 ай бұрын
@@johnpaulinhog462 I'm making a follow up, but it's about setting up a self-managed VPS server from scratch, configuring nginx sites, etc.
@johnpaulinhog462
@johnpaulinhog462 4 ай бұрын
@@glennraya That's nice, looking forward to your next upload 🙏
@glennraya
@glennraya 4 ай бұрын
@@johnpaulinhog462 Thanks
@johnpatricklachica4090
@johnpatricklachica4090 4 ай бұрын
Sir, is this approach safe?
@glennraya
@glennraya 4 ай бұрын
Yes, this deployment process is very common, this is also called CD (Continuous Deployment).
@johnpatricklachica4090
@johnpatricklachica4090 4 ай бұрын
@@glennraya thanks. This will be helpful in one of my projects.
@keremardcl6759
@keremardcl6759 4 ай бұрын
Do you really need to put server ip in a secret key :)
@glennraya
@glennraya 4 ай бұрын
You may not, but I usually put it there, for added security so only authorized "eyes" can see the IP, especially when you are working on a team.
@jindrastory
@jindrastory 4 ай бұрын
I'm having a problem and need help. [Rsync] error: rsync exited with code 255 ⚠ [Rsync] stderr: Warning: Permanently added '***' (ED25519) to the list of known hosts. Load key "/home/runner/.ssh/deploy_key": error in libcrypto Permission denied, please try again. Permission denied, please try again. ***@***: Permission denied (publickey,password). rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: unexplained error (code 255) at io.c(231) [sender=3.2.7]
@glennraya
@glennraya 4 ай бұрын
That means GitHub is not authorized to connect to your server. This usually indicates that either the SSH key, HOST, or USER is incorrect.
Laravel deployment with GitHub Actions
49:45
Philo Hermans
Рет қаралды 25 М.
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
36:55
bayGUYS
Рет қаралды 1,9 МЛН
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 62 МЛН
Cheerleader Transformation That Left Everyone Speechless! #shorts
00:27
Fabiosa Best Lifehacks
Рет қаралды 16 МЛН
Stop With Software Estimates
16:54
ThePrimeTime
Рет қаралды 150 М.
FreeBSD in 100 Seconds
3:28
Fireship
Рет қаралды 578 М.
Laravel Gems - Pipelines 💎
15:21
Laravel
Рет қаралды 11 М.
ChatGPT for Laravel Devs: 9 Use-Cases You May Not Think About
9:44
Quick & Easy DigitalOcean VPS Setup for Your Laravel/PHP Apps
37:25
Advanced Laravel Testing: CI/CD with GitHub Actions
8:09
Laravel Daily
Рет қаралды 20 М.
Free, fast, full text search: Laravel + Typesense
22:04
Aaron Francis
Рет қаралды 14 М.
Build Your Own Custom Auth System with Fortify
20:14
Laravel
Рет қаралды 9 М.
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
36:55
bayGUYS
Рет қаралды 1,9 МЛН