Laravel deployment with GitHub Actions

  Рет қаралды 25,008

Philo Hermans

Philo Hermans

Күн бұрын

Пікірлер: 111
@wisliylopes
@wisliylopes 3 жыл бұрын
I have to thank you here too. This is the more detailed guide that I found on this subject. Thank you very much.
@PhiloDev
@PhiloDev 3 жыл бұрын
Thanks Wisliy!
@iamnomana
@iamnomana 2 жыл бұрын
Hi Philo, thanks for this excellent tutorial on CI/CD with Laravel. I've been searching for a video like this for some time now. I love how you explained each step. Thanks, once again.
@PhiloDev
@PhiloDev 2 жыл бұрын
Thanks! Glad it was helpful!
@steckrein6322
@steckrein6322 3 жыл бұрын
I searched for this for a really long time. You helped me alot.
@ashishroy1559
@ashishroy1559 9 ай бұрын
This is one of the best tutorials. Thanks for this excellent tutorial.
@nteej-mink
@nteej-mink Жыл бұрын
Hi Philo,This is great tutorial I've followed it continous 2 days to get setup final working model.Thanks a lot for your great effort to build this nice tutorial.
@PPVos-sg4ey
@PPVos-sg4ey 2 ай бұрын
This video is a lifesaver. Thank you!
@SouravRakshit_srv
@SouravRakshit_srv 3 жыл бұрын
couldn't skip a sec it was that good & detailed. Thanks Phil ♥
@kohilankh2321
@kohilankh2321 2 жыл бұрын
Very detailed explanation thank you buddy, do more like this on KZbin please...
@RizwanSaleem70
@RizwanSaleem70 2 жыл бұрын
Thanks a lot Philo, A really informative and excellent explanation on CI/CD. Subscribed
@PhiloDev
@PhiloDev 2 жыл бұрын
Thanks! That’s great to hear!
@mydentalscaler3462
@mydentalscaler3462 2 жыл бұрын
Amazing content, thanks for sharing!
@TrondHus
@TrondHus 3 жыл бұрын
Hey Philo! This is great. I have been looking for something like this. Hopefully my days with FTP-uploads and forgetting files are gone. I will test this with a minor project I am currently working on.
@kuzuru
@kuzuru 4 жыл бұрын
Thank you very much, Philo!
@PhiloDev
@PhiloDev 4 жыл бұрын
Thanks for leaving a comment 🙌🏼 I'm happy to hear that you enjoyed the video! More videos are coming so don't forget to subscribe 😄
@codelaravel
@codelaravel 2 жыл бұрын
You are doing a great job.
@PhiloDev
@PhiloDev 2 жыл бұрын
Thank you!
@reactoranime
@reactoranime 2 жыл бұрын
Very good quality! Nice job
@PhiloDev
@PhiloDev Жыл бұрын
Thanks!
@danielneu9136
@danielneu9136 2 жыл бұрын
Really, really awesome tutorial
@PhiloDev
@PhiloDev 2 жыл бұрын
Thanks!
@RJFares
@RJFares 2 жыл бұрын
I have used this script for a year now, excellent ;) It should be updated because github's set-output is getting deprecated and removed soon (FYI the link to the blog post points to 404).
@PhiloDev
@PhiloDev 2 жыл бұрын
The article has been updated to include the changes :) Also fixed the link, thanks!
@rasyidzuhri540
@rasyidzuhri540 3 жыл бұрын
Hi Philo.. im waiting for next vidio pleaseeee
@laduniestu
@laduniestu 11 ай бұрын
Awesome Video! This tutorial is still works right now? for Laravel with Vite.
@PhiloDev
@PhiloDev 11 ай бұрын
Yes! Still works, there is one minor change but you can see the updated blog article for more information 😄
@sudhirmitharwal
@sudhirmitharwal 4 жыл бұрын
Love it
@PhiloDev
@PhiloDev 4 жыл бұрын
Thanks Sudhir! 😄
@JustinVanOel
@JustinVanOel 4 жыл бұрын
Awesome video Philo!
@ronnieisurina6246
@ronnieisurina6246 3 жыл бұрын
Thanks for sharing
@pubudusj
@pubudusj 4 жыл бұрын
Awesome stuff Philo
@PhiloDev
@PhiloDev 4 жыл бұрын
Thanks Pubudu! :)
@tiktokdaily9844
@tiktokdaily9844 2 жыл бұрын
Thanks a lot Philo for the great tutorial. Can we use another directory outside public root to store artifacts, releases, storage and .env file? I think there is an security issue having .env in public root directory
@PhiloDev
@PhiloDev 2 жыл бұрын
Thanks! Your .env is not in the public root directory. You should set the root directory to your-project/current/public (this is your Laravel's public folder, this doesn't contain the .env)
@shahmirjadoon3587
@shahmirjadoon3587 2 жыл бұрын
Awesome tutorial, really helpful.
@IlyesKechidi
@IlyesKechidi 3 жыл бұрын
Awesome tutorial, keep up
@PhiloDev
@PhiloDev 3 жыл бұрын
Thanks, will do!
@mikeglobal9084
@mikeglobal9084 3 жыл бұрын
Hey Philo, this is amazing content, also, would be great to see how did you set up your phpstorm IDE that it fires the autocomplition on yml files, this is really amazing. Thanks!
@PhiloDev
@PhiloDev 3 жыл бұрын
Hey Mike, thanks for your comment! I did a quick check but the autocompletion of the yml files is something phpstorm does automatically.
@mikeglobal9084
@mikeglobal9084 3 жыл бұрын
@@PhiloDev Thank you for checking this out, I double checked as well and it doesn't seem to autocomplete on my side:(
@PhiloDev
@PhiloDev 3 жыл бұрын
@@mikeglobal9084 it might be worth checking if the YAML plugin is enabled. Plugins -> YAML(this should be enabled by default though)
@dreed47
@dreed47 3 жыл бұрын
The parsing of the deployment-config.json fails for me. I get an error that says Error when evaluating 'strategy' for job 'prepare-release-on-servers'. (Line: 54, Col: 17): After parsing a value an unexpected character was encountered: {. Path '[0]', line 2, position 5.,(Line: 54, Col: 17): Unexpected value '' I've tried modifying the json ond tweaking the action parsing code but can't get it to work.
@PhiloDev
@PhiloDev 3 жыл бұрын
Hi David, This error often occurs when the JSON is multi-line so I'm thinking that for some reason the JSON is not escaped. Could you verify the "Export deployment matrix" step? You can find the source code here: philo.dev/how-to-use-github-actions-build-matrix-to-deploy-artifacts-to-multiple-servers/
@buggxs
@buggxs 3 жыл бұрын
This worked for me: echo "::set-output name=deployment-matrix::$(echo $JSON)" Also its written like this in the docs
@ustpromotion
@ustpromotion 2 жыл бұрын
I got same problem here, extra one space, indetation may solve.
@BrianHammond04073
@BrianHammond04073 2 жыл бұрын
@@buggxs Worked for me too! Thank you Andre! id: export-deployment-matrix run: | JSON="$(cat ./deployment-config.json)" JSON="${JSON//'%'/'%25'}" JSON="${JSON//' '/'%0A'}" JSON="${JSON//' '/'%0D'}" echo "::set-output name=deployment-matrix::$(echo $JSON)"
@michaelbarasa1569
@michaelbarasa1569 2 жыл бұрын
This is an excellent tutorial; however, I was wondering if it could also be used with shared hosting.
@PhiloDev
@PhiloDev 2 жыл бұрын
Yes, it could work if your hosting supports ssh access.
@Martin-f6m7e
@Martin-f6m7e 10 ай бұрын
Hi Philo! Thx you for your efforts to make a good video.I have one important question to you: I am very inexperienced with deployment but I find it very dangerous to store the credentials in a json and upload it to the repository. Is that normal? I would have stored the crendetials as keys in GitHub secrets and only addressed them via variables in my deployment yml. What do you think?
@PhiloDev
@PhiloDev 10 ай бұрын
Agreed! This was just for the tutorial to make it a bit easier. If you check out the blog article it will explain how to use SSH keys instead :) philo.dev/how-to-use-github-actions-build-matrix-to-deploy-artifacts-to-multiple-servers/
@abdulwajid375
@abdulwajid375 2 жыл бұрын
Kindly share the YML file
@jahiddev
@jahiddev 3 жыл бұрын
Awesome video keep on.
@PhiloDev
@PhiloDev 3 жыл бұрын
Thanks, will do!
@MarcelloPato
@MarcelloPato 6 ай бұрын
Damn FrontPage, we are old man!
@alexandermercyadeiza1796
@alexandermercyadeiza1796 3 жыл бұрын
Hey Philo, this was an amazing tutorial, I did have one issue, I have breezed installed and pushed, but my login and register routes don't work, any thoughts?
@PhiloDev
@PhiloDev 3 жыл бұрын
Thanks! Do any of your other routes work? This workflow should not have any effect on your routes. I'm using this exact same set up for all my applications without any routes issues.
@alexandermercyadeiza1796
@alexandermercyadeiza1796 3 жыл бұрын
@@PhiloDev thanks for the response, really appreciate it. I installed Laravel breeze on local, then after I pushed to server using the flow, the login and register routes returns nginx 404 not found.
@alexandermercyadeiza1796
@alexandermercyadeiza1796 3 жыл бұрын
I finally made this work, I had to vi into my nginx config file and add this line: try_files $uri $uri/ /index.php$is_args$args; I don't know why it happened, but this fixed the nginx 404 not found error on my routes. Thanks again Philo for sharing this.
@superkajjin
@superkajjin 2 жыл бұрын
Hi Philo thank you for this amazing tutorial! Just one questions regarding the deployments-config.json file that you commit in your repo and exposes all your servers sensitive data? do you think it could be a security risk? is there any way to have that file saved like github secrets or somewhere else where is more secure? thank you!!
@PhiloDev
@PhiloDev 2 жыл бұрын
Hey Miguel, I'm happy to hear you liked the tutorial! Keeping sensitive data out of your repository is definitely good practice. Instead of loading the JSON file from your repository you can indeed put the contents of the file in a github secret as well and reference this in the deployment workflow.
@lijahtech8200
@lijahtech8200 3 жыл бұрын
Amazing content,loved every bit. How do I configure it on a shared hosting server(Apache)
@PhiloDev
@PhiloDev 3 жыл бұрын
If you shared hosting has SSH support it will work just the same. If it doesn't I would recommend switching to a hosting provider that provides a VPS like DigitalOcean or AWS.
@lijahtech8200
@lijahtech8200 3 жыл бұрын
@@PhiloDev thanks
@rickbeniers667
@rickbeniers667 6 ай бұрын
is deploying to kubernetets cluster around the same as for the services you are using?
@PhiloDev
@PhiloDev 6 ай бұрын
@@rickbeniers667 not sure about that I’m not using Kubernetes. I guess it is somewhat similar but instead you build, push and deploy an image instead of a zip file.
@rickbeniers667
@rickbeniers667 6 ай бұрын
@@PhiloDev ahh okay. I was playing around with docker images earlier so will try that next. thanks for the tip!
@sharktankdevelopment1977
@sharktankdevelopment1977 3 жыл бұрын
Hi Philo, great video! Let me know if you are interested in a Laravel project...
@tomatenow
@tomatenow 2 жыл бұрын
Hi Philo, this is a great tutorial, thank you. I have an issue on appleboy/scp-action , when scp to server I get: drone-scp error: stdin: is not a tty. Have you some ideas how to solve it?
@PhiloDev
@PhiloDev 2 жыл бұрын
Thanks Stefano! It’s challenging to determine what causes that issue without knowing all the details. I would try the latest ubuntu distro and see if that solves the issue.
@tomatenow
@tomatenow 2 жыл бұрын
@@PhiloDev Thanks, I'll try that.
@hendisantika
@hendisantika Жыл бұрын
Is there any github repo for full code? Thanks
@PhiloDev
@PhiloDev Жыл бұрын
No repo but you can find the code in the blog article :)
@joant5036
@joant5036 2 жыл бұрын
And ... .could you explain how to use ssh keys instead of name and password as access to production server?
@PhiloDev
@PhiloDev 2 жыл бұрын
The blog article has been updated to include how to use SSH keys instead philo.dev/how-to-use-github-actions-build-matrix-to-deploy-artifacts-to-multiple-servers/
@jabahuntercrypto
@jabahuntercrypto 4 ай бұрын
So good
@kaddourbendahmamohamedelam707
@kaddourbendahmamohamedelam707 Жыл бұрын
can you help me, links are not working and give me 404 error what di i do ?
@PhiloDev
@PhiloDev Жыл бұрын
Which links?
@kaddourbendahmamohamedelam707
@kaddourbendahmamohamedelam707 Жыл бұрын
@@PhiloDev all the links login register about contact every link in the laravel application i'm using laravel+vuejs+inertia
@kaddourbendahmamohamedelam707
@kaddourbendahmamohamedelam707 Жыл бұрын
@@PhiloDev i have fixed the problem it was in the nginx config thnak you
@chetankharel4435
@chetankharel4435 3 жыл бұрын
Loved it
@PhiloDev
@PhiloDev 3 жыл бұрын
Thanks Chentan!
@chetankharel4435
@chetankharel4435 3 жыл бұрын
Loved everything but permission can create security issues I think. www-data would be better in place of 0777
@PhiloDev
@PhiloDev 3 жыл бұрын
@@chetankharel4435 Thanks for your feedback; I 100% agree. I'm trying to find the right balance between what to explain in-depth and what to keep simple. I think I can spend hours talking about server provisioning as well haha.
@chetankharel4435
@chetankharel4435 3 жыл бұрын
@@PhiloDev Great I searched every videos on KZbin to implement it finally cudos to you thanks 😊
@sant1ago-da-hanoi
@sant1ago-da-hanoi 2 жыл бұрын
hey, what if i use ssh key?
@PhiloDev
@PhiloDev 2 жыл бұрын
See the following tutorial philo.dev/how-to-use-github-actions-build-matrix-to-deploy-artifacts-to-multiple-servers/
@lmn2392
@lmn2392 2 жыл бұрын
keren banget
@joant5036
@joant5036 2 жыл бұрын
Nice video! Very, very useful! But I have a problem. I'm trying to deploy an existing full Laravel app, and I get a composer install error. composer install --no-dev --no-interaction --prefer-dist ..... ..... ..... SQLSTATE[HY000] [2002] Connection refused (SQL: select column_name as `column_name` from information_schema.columns where table_schema = ***** and table_name = roles) Has anybody this same error? Thank you!!
@joant5036
@joant5036 2 жыл бұрын
It was an error of "postAutoloadDump". I've temporary solved with composer install --no-dev --verbose --prefer-dist --optimize-autoloader --no-interaction --no-scripts;
@PhiloDev
@PhiloDev 2 жыл бұрын
Happy to hear you enjoyed the video and solved the problem.
@JatinThapar
@JatinThapar 3 жыл бұрын
Getting error: create folder /artifacts /var/www/html/artifacts 23 untar file c5yHb7EvxL.tar 24 error: tar: /var/www/html/artifacts: Not found in archive 25 tar: Exiting with failure status due to previous errors
@shahmirjadoon3587
@shahmirjadoon3587 2 жыл бұрын
Gave your user permission to create folder inside /var/www/html folder
@iTahirAfridi
@iTahirAfridi Жыл бұрын
It is outdated now, not working
@iTahirAfridi
@iTahirAfridi Жыл бұрын
Github updates some actions and hence the code in yml file followed with is now no longer working and giving deprecation errors
@PhiloDev
@PhiloDev Жыл бұрын
Thanks for the comment! The tutorial is over 2 years old, but it still works. However, you will get some deprecation errors. Luckily it only requires a few minor changes, which can be found in the blog article :) philo.dev/how-to-use-github-actions-build-matrix-to-deploy-artifacts-to-multiple-servers/
@iTahirAfridi
@iTahirAfridi Жыл бұрын
@@PhiloDev Thanks, for the link. I will check this :)
@iTahirAfridi
@iTahirAfridi Жыл бұрын
@@PhiloDev can you please give me the url to this updated .yml file? I'm lost and didn't know why I'm getting errors.
@iTahirAfridi
@iTahirAfridi Жыл бұрын
@@PhiloDev for me the actions/checkout@v3 is not working with npm install and npm run dev/prod so I commented out the lines for npm and it worked, my app doens't need npm so i commented out but if someone's code need this, it has error
@hassucigar
@hassucigar 2 жыл бұрын
Hi Philo, I am at 27:51 and the tutorial is going amazing, but I got stuck now, I am having error when pushed my code error is : tar all files into /tmp/2785375458/AmqnRwzLKN.tar scp file to server. create folder /var/www/html//artifacts // /var/www/html/artifacts untar file AmqnRwzLKN.tar error: tar: /: Not found in archive tar: /var/www/html/artifacts: Not found in archive tar: Exiting with failure status due to previous errors drone-scp error: Process exited with status 2 drone-scp rollback: remove all target tmp file remove file AmqnRwzLKN.tar 2022/08/18 10:39:20 Process exited with status 2 can you help me with this, please? Regards Hasan Mehdi
@PhiloDev
@PhiloDev 2 жыл бұрын
Seems like you may have made a typo. You can also use the article as a reference and check if everything is correct philo.dev/how-to-use-github-actions-build-matrix-to-deploy-artifacts-to-multiple-servers/
@hassucigar
@hassucigar 2 жыл бұрын
@@PhiloDev Thanks alot. Can you make video on how to setup docker with laravel ?
@PhiloDev
@PhiloDev 2 жыл бұрын
@@hassucigar if you want to use Laravel and Docker I recommend Laravel Sail. If you want to use Docker in production, Laravel Vapor or Fly.io are great solutions that takes care of all the things Docker related.
@vijaymchauhancom9739
@vijaymchauhancom9739 2 жыл бұрын
Amazing content, thanks for sharing!
@PhiloDev
@PhiloDev 2 жыл бұрын
Glad you enjoyed it!
@legitcyberlord869
@legitcyberlord869 2 жыл бұрын
Awesome tutorial, really helpful.
@PhiloDev
@PhiloDev 2 жыл бұрын
Glad it was helpful!
GitHub Actions Tutorial - Basic Concepts and CI/CD Pipeline with Docker
32:31
TechWorld with Nana
Рет қаралды 1,6 МЛН
OCCUPIED #shortssprintbrasil
0:37
Natan por Aí
Рет қаралды 131 МЛН
GIANT Gummy Worm #shorts
0:42
Mr DegrEE
Рет қаралды 152 МЛН
Ful Video ☝🏻☝🏻☝🏻
1:01
Arkeolog
Рет қаралды 14 МЛН
Deploy To Shared Hosting With Github Actions
15:19
Watch and Learn
Рет қаралды 45 М.
Laravel 8 REST API With Sanctum Authentication
54:13
Traversy Media
Рет қаралды 552 М.
Automatic Deployment With Github Actions
43:26
Traversy Media
Рет қаралды 179 М.
5 Ways to DevOps-ify your App - Github Actions Tutorial
12:12
Fireship
Рет қаралды 708 М.
Easily deploy a Laravel application with Docker
21:21
Andrew Schmelyun
Рет қаралды 92 М.
Laravel Roles and Permissions: All CORE Things You Need To Know
16:32
Laravel Daily
Рет қаралды 229 М.
Github Actions CI/CD - Everything you need to know to get started
12:21
Laravel Docker Course | Complete Laravel Dockerization
43:31
Emad Zaamout
Рет қаралды 88 М.
Introducing Wirebox for Livewire
5:49
Philo Hermans
Рет қаралды 3,7 М.
OCCUPIED #shortssprintbrasil
0:37
Natan por Aí
Рет қаралды 131 МЛН