Deploy To Shared Hosting With Github Actions

  Рет қаралды 44,355

Watch and Learn

Watch and Learn

Күн бұрын

We already did a similar episode to this but instead of using #Github, we were using Git module that comes with #cPanel. That approach has some problems, at least the viewers of the channel have reported some problems. So now instead of using Git module from cPanel we are going to be using Github and Github #Actions to deploy our site to staging and production servers. Github Actions makes this so easy, as you will see in the video.
----------------------------------------------------------------------------------------------
⭐ Kite is a free AI-powered coding assistant that will help you code faster and smarter. The Kite plugin integrates with all the top editors and IDEs to give you smart completions and documentation while you’re typing. You can check it out here: bit.ly/3qdjIc5​​
------------------------------------------------------------------------------------------------
You can support my work on Patreon
/ watchlearn
Follow me on Social Media
Github: github.com/iva...
Twitter: / ivan_doric
Instagram: / watchlearntuts
Facebook: / watchlearntutorials

Пікірлер: 139
@devglow-amindu
@devglow-amindu 2 жыл бұрын
Amazing. Thank you very much Sir. Love from Sri Lanka 🇱🇰
@ceeeff770
@ceeeff770 2 жыл бұрын
This is so simple yet I had been struggling to put everything together. Great tutorial, covered all the angles.
@WatchandLearnTutorials
@WatchandLearnTutorials 2 жыл бұрын
Nice. Glad I could help 😀
@Nothing-cx4jt
@Nothing-cx4jt 2 жыл бұрын
Amazing tutorial. That's what I was looking for. Simple yet so clearly explained. Thank you so much.
@WatchandLearnTutorials
@WatchandLearnTutorials 2 жыл бұрын
Glad I could help, and thanks for watching 😀
@ashkanahmadi
@ashkanahmadi 2 жыл бұрын
Great thank you so much. I can finally let GitHub push my changes to the server instead of manually deleting and reuploading files every time!! Highly appreciate it
@WatchandLearnTutorials
@WatchandLearnTutorials 2 жыл бұрын
Glad I could help 😀
@chaddavis7325
@chaddavis7325 4 ай бұрын
Amazing tutorial! Thank you!
@sayedatiqurrahman1483
@sayedatiqurrahman1483 3 ай бұрын
so helpful video, recommended
@llouzada
@llouzada 2 жыл бұрын
Amazing solution! I´ll be implementing that soon
@mememihnea
@mememihnea 3 жыл бұрын
Simply great! Good stuff, keep up the good work.
@WatchandLearnTutorials
@WatchandLearnTutorials 3 жыл бұрын
Thanks man! 😀
@ambymbayi
@ambymbayi Жыл бұрын
nice tutorial. What are the themes you are using for terminal and vscode?❤ then really look awesomw
@mattskelton9332
@mattskelton9332 2 жыл бұрын
Fantastic. Just what I was looking for. Thanks!
@WatchandLearnTutorials
@WatchandLearnTutorials 2 жыл бұрын
Glad I could help 👍
@richardlee2708
@richardlee2708 6 ай бұрын
Perfect walkthrough. Just remember your / on your directories which I forgot!
@ahmetozfen
@ahmetozfen Жыл бұрын
Great job! Thank you for making my job so easy
@WatchandLearnTutorials
@WatchandLearnTutorials Жыл бұрын
No problem 😄
@thanhminh1602
@thanhminh1602 2 жыл бұрын
Very good, easy to work. Let me try it. Thank you!
@JacquesvanWyk
@JacquesvanWyk 3 жыл бұрын
Awesome man so simple and exactly what I needed.
@WatchandLearnTutorials
@WatchandLearnTutorials 3 жыл бұрын
Glad I could help 😀
@sarunaskybartas6025
@sarunaskybartas6025 6 ай бұрын
Hi, thank you 🤘
@verynice.mp4613
@verynice.mp4613 Жыл бұрын
How You would run it if you have more then one FTP server? In my case I need to deliver same files to 9 different FTP servers.
@sayidinaahmadalqososyi9770
@sayidinaahmadalqososyi9770 Жыл бұрын
Thanks bro, u help me a lot with a simple way😅
@WatchandLearnTutorials
@WatchandLearnTutorials Жыл бұрын
No problemo 😄
@WillGittens001
@WillGittens001 2 жыл бұрын
Thanks man!! Simple, fast and complete.
@WatchandLearnTutorials
@WatchandLearnTutorials 2 жыл бұрын
Glad you like it 😀
@MrAlao675
@MrAlao675 7 ай бұрын
This is so good. Can we use this with Private Repo? Thank you!
@WatchandLearnTutorials
@WatchandLearnTutorials 7 ай бұрын
I think you could use a private repo, sure.
@devMoemen
@devMoemen 2 жыл бұрын
Amazing tutorial. thank you vey much
@TheLastArcher
@TheLastArcher Жыл бұрын
Helped me a lot, Thanks
@WatchandLearnTutorials
@WatchandLearnTutorials Жыл бұрын
Nice 😄
@ramirezvilla
@ramirezvilla Жыл бұрын
This is awesome, will an angular application work with hostgator hosting service, using this method. Im very new to this. Thank you for your service!! Great videos
@WatchandLearnTutorials
@WatchandLearnTutorials Жыл бұрын
I would guess probably not. But I never used Angular so I can't be sure.
@lalustinetech7668
@lalustinetech7668 2 жыл бұрын
Thank you so much for this tutorial, its great help. In my case, i want to deploy laravel project but in github, vendor file will not be uploaded so in each time of deployment, is there any way to include vendor folder or run some command ?
@WatchandLearnTutorials
@WatchandLearnTutorials 2 жыл бұрын
Your vendor folder is probably defined in .gitignore. As it should be. You can remove it from there and then your vendor folder will be uploaded. But that is not recommended. What you need is some action that will run: `composer install` once your files are uploaded. But that can't be done with the simple setup like in the video. Doesn't Laravel eco system have like a million tools for deploying Laravel (Laravel Forge or something like that)? Also you can look for specific Laravel actions on github and start from there, this video is meant and will work with static sites only.
@jajahmahn7083
@jajahmahn7083 2 жыл бұрын
Life Saver
@dan_le_brown
@dan_le_brown 2 жыл бұрын
Awesome content. New subscriber 🙌
@WatchandLearnTutorials
@WatchandLearnTutorials 2 жыл бұрын
Thanks, glad you like the content 👍
@Rob-cq1nf
@Rob-cq1nf 3 жыл бұрын
very well and understandably explained 👍 Thanks
@WatchandLearnTutorials
@WatchandLearnTutorials 3 жыл бұрын
Thanks :)
@sebastiannieroda9022
@sebastiannieroda9022 Жыл бұрын
Hi. Great tutorial like always. Thanks a lot! But i have an error: "Error: Server sent FIN packet unexpectedly, closing connection." Any idea what could be the reason?
@mhcostapimenta
@mhcostapimenta 2 жыл бұрын
Great job! Awesome!!!
@WatchandLearnTutorials
@WatchandLearnTutorials 2 жыл бұрын
Thanks man! 😀
@justinchristensen23
@justinchristensen23 3 жыл бұрын
Any update on when the Wordpress/Next.js Course will be available?
@WatchandLearnTutorials
@WatchandLearnTutorials 3 жыл бұрын
No, sorry. It's going really slowly, because of personal life - child, moving houses, just started on a new job etc. Only thing I can say it will be done when it's done. Sorry.
@_thewatcher27
@_thewatcher27 2 жыл бұрын
Thanks! You deserve a sub!
@whatnothin1401
@whatnothin1401 Жыл бұрын
Na šta bi trebalo obratiti pažnju ako je u pitanju react app? Pretpostavljam da bi u nekom momentu u akcije trebalo upaciti "npm build" :D, hvala u svakom slučaju, super tutorial! pozz
@WatchandLearnTutorials
@WatchandLearnTutorials Жыл бұрын
Da, ali i zavisi šta radiš, ako praviš kompletno statički site u npr. NextJS onda možeš samo baciti gore statičke fajlove, a build (npm run export) napraviš lokalno.
@whatnothin1401
@whatnothin1401 Жыл бұрын
@@WatchandLearnTutorials Ok, hvala
@kuldeepchaturvedi1894
@kuldeepchaturvedi1894 2 жыл бұрын
Hey Dude Thanks for the demo. I have one question how can I change the configuration of a file before deploying it to server? I want to change the database name before deployment.
@WatchandLearnTutorials
@WatchandLearnTutorials 2 жыл бұрын
That info is usually saved in .env files. However you would not send .env files through git, because database name, username, password would usually be differnet locally. So you have to add .env file manually, through FTP.
@md.ziaurrahman9146
@md.ziaurrahman9146 2 жыл бұрын
Really Amazing tutorial!
@WatchandLearnTutorials
@WatchandLearnTutorials 2 жыл бұрын
Thanks 😀 hope it helps.
@switchlyrics.
@switchlyrics. 5 ай бұрын
Helpful
@dast6915
@dast6915 3 жыл бұрын
just what i wanted to do. so will try it out on the next push
@WatchandLearnTutorials
@WatchandLearnTutorials 3 жыл бұрын
Glad I could help :D
@JesseUnderscoreMartin
@JesseUnderscoreMartin 2 жыл бұрын
Very good video!
@brunolima2589
@brunolima2589 3 жыл бұрын
Awesome tutorial, really thanks!
@WatchandLearnTutorials
@WatchandLearnTutorials 3 жыл бұрын
You are welcome! 😀
@samsenolay2210
@samsenolay2210 10 ай бұрын
Bro. I'm using Special FTP Accounts instead of just normal FTP Accounts. So, will still that works?
@BillElgin
@BillElgin 9 ай бұрын
Instead of using FTP, can you tell me how to modify the script so it uses SSH to push the files to the shared hosting server?
@skycrossbones
@skycrossbones 3 жыл бұрын
Man, thank you so so so so so much, you are a live saver.
@WatchandLearnTutorials
@WatchandLearnTutorials 3 жыл бұрын
Glad I could help 😀
@RustyNox
@RustyNox Жыл бұрын
There are issues with Sam's FTP/SSH action tools today, likely regarding ED25519 key changes. Such a shame, hoping the team can fix soon.
@sai_charan
@sai_charan 3 жыл бұрын
Thank you, Ivan!
@WatchandLearnTutorials
@WatchandLearnTutorials 3 жыл бұрын
No problem 😀
@jovan_script
@jovan_script 2 жыл бұрын
Good stuff, thanks!
@WatchandLearnTutorials
@WatchandLearnTutorials 2 жыл бұрын
Thanks for watching 😀
@fredygerman_
@fredygerman_ 2 жыл бұрын
Thank youuu so much for this ❤️
@WatchandLearnTutorials
@WatchandLearnTutorials 2 жыл бұрын
You are welcome 😀
@khuntipsngi
@khuntipsngi Жыл бұрын
Saved a ton of my time ❤
@WatchandLearnTutorials
@WatchandLearnTutorials Жыл бұрын
Nice 👍
@jonice4229
@jonice4229 3 жыл бұрын
What IDE are you using?looks awesome
@WatchandLearnTutorials
@WatchandLearnTutorials 3 жыл бұрын
It's VS Code. Nothing special 😀
@stefanbogdanovic590
@stefanbogdanovic590 3 жыл бұрын
Cao Ivane, da li ovaj github actions moze da se primeni i na Wordpress? Hvala unapred majstore :)
@WatchandLearnTutorials
@WatchandLearnTutorials 3 жыл бұрын
Može, zašto ne. Jedino naravno, pošto WP radi kako radi, morat ćeš i dalje bazu prebacivati ručno. Ali datoteke možeš bez problema prebacivati na ovaj način.
@stefanbogdanovic590
@stefanbogdanovic590 3 жыл бұрын
@@WatchandLearnTutorials Hvala ti punoo :). Sve najboljee.
@padmakarkasture2969
@padmakarkasture2969 3 жыл бұрын
best ever
@_romeopeter
@_romeopeter 3 жыл бұрын
Thank you! This is way easier than using TravisCI
@WatchandLearnTutorials
@WatchandLearnTutorials 3 жыл бұрын
Glad I could help 😀
@hazara-encyclopedia
@hazara-encyclopedia 3 жыл бұрын
Question: Does that work with Addon domains the same way with subdomains? I am working on a website that the main folder is located in public_html and it has addon domain.
@WatchandLearnTutorials
@WatchandLearnTutorials 3 жыл бұрын
I don't know. You can try it, and see what you get.
@SebastianPerezG
@SebastianPerezG 3 жыл бұрын
Question , this also compares que newest or changed files in the ftp o copies all again ?
@kemekenneth
@kemekenneth 3 жыл бұрын
No, it doesn't. Same question I came to ask here. It would be nice and less expensive if it can upload just the updates files.
@vladyslavbondarenko4983
@vladyslavbondarenko4983 3 жыл бұрын
Thanks man! 👍👍👍
@WatchandLearnTutorials
@WatchandLearnTutorials 3 жыл бұрын
Thanks for watching. :)
@manuelmedina4147
@manuelmedina4147 3 жыл бұрын
Thanks!!!
@WatchandLearnTutorials
@WatchandLearnTutorials 3 жыл бұрын
You are welcome 😀
@ezra3871
@ezra3871 2 жыл бұрын
thank you
@WatchandLearnTutorials
@WatchandLearnTutorials 2 жыл бұрын
No problem 👍
@flavienrako979
@flavienrako979 3 жыл бұрын
very well easy to implement. Is there a way to host strapi in cpanel hosting ?
@WatchandLearnTutorials
@WatchandLearnTutorials 3 жыл бұрын
Yes there is. And I have a video about it: kzbin.info/www/bejne/m5O6e5WYirlniqM however, I would advise against that, because your Strapi app will probably stop working after a day or two, even when using something like PM2. At least that was how it behaved on my hosting. So it would be better to use something like Digital Ocean, AWS etc. for hosting Strapi. Shared hosting/cPanel is just not ready for something like that.
@flavienrako979
@flavienrako979 3 жыл бұрын
@@WatchandLearnTutorials thanks for your advice. Actually I host my application at Heroku, I'm familiar with the cpanel environment but never used it for node app, I want to test it with pm2.
@WatchandLearnTutorials
@WatchandLearnTutorials 3 жыл бұрын
@@flavienrako979 Did you test it? How did it go?
@flavienrako979
@flavienrako979 3 жыл бұрын
@@WatchandLearnTutorials Yes and I have a lot of trouble with my server. So, I decided to take a server vps at ionos. And now I'm trying to dockerize my strapi application .
@WatchandLearnTutorials
@WatchandLearnTutorials 3 жыл бұрын
@@flavienrako979 Hehe :) ... cool. So you are bringing Docker to the fight 😀 ? Hope that works out. Let me know how it goes.
@Guna586
@Guna586 Жыл бұрын
Hey, the Kite link is broken, just thought to notify you.
@WatchandLearnTutorials
@WatchandLearnTutorials Жыл бұрын
Kite doesn't exist any more. So yeah :) www.kite.com/blog/product/kite-is-saying-farewell/
@mrniamster
@mrniamster 3 жыл бұрын
Can u please tell me how can I do it with dist folder as it's always recreated and .git folder is lost on every time I do npm run build 🙏😭
@WatchandLearnTutorials
@WatchandLearnTutorials 3 жыл бұрын
What do you mean .git is lost every time you build? That should not be happening. As for dist folder you can either add additional build step to your yml files, or you can build locally, and push that to Github.
@mrniamster
@mrniamster 3 жыл бұрын
@@WatchandLearnTutorials when I do build in vue cli , all files are re-created with newly changes in dist folder, I want to push the dist files to git , so as of now I copy .git folder and paste manually back to push again as .git folder is deleted on evry npm run build
@WatchandLearnTutorials
@WatchandLearnTutorials 3 жыл бұрын
@@mrniamster I still don't understand. Why are you touching .git folder? You should not touch that folder.
@mrniamster
@mrniamster 3 жыл бұрын
@@WatchandLearnTutorials ok I say again, When I do npm run build , It produces /dist folder on production Now I create git on dist folder to push on my shared hosting But when I do a npm run build again later the .git folder is removed ,due to which I loose info about tracked files so I had to git init again Problem: I want to stop vue cli to delete the .git folder
@WatchandLearnTutorials
@WatchandLearnTutorials 3 жыл бұрын
@@mrniamster Maybe ask at some of the Vue channels, npm run build should not delete .git folder. There is something very weird happening on your end then. Honestly I've never heard of something like this. npm should only build your files, nothing should make changes to .git folder except for git commands.
@ubaidkhan426
@ubaidkhan426 2 жыл бұрын
Good :thumb
@hamzasaqib3802
@hamzasaqib3802 2 жыл бұрын
i am using this to deploy my laravel project but issue is its no transferring the complete file, like composer.lock and routes etc
@WatchandLearnTutorials
@WatchandLearnTutorials 2 жыл бұрын
This method is only good for static sites, it won't work with something like Laravel or Node apps, because there you would usually need to run 'composer install' or 'npm install' to install all the dependencies. But if composer.lock or routes are not transfered then check your .gitignore, maybe those files are ignored.
@hamzasaqib3802
@hamzasaqib3802 2 жыл бұрын
@@WatchandLearnTutorials yup you are right about composer install. and i have triple check the gitignore.
@MilanDrazic
@MilanDrazic 3 жыл бұрын
can you show us how to deploy the MERN stack app on the c panel with GitHub action??? I have a client folder and server folder at the root of the app and create .github/workflows. What is next to build React app or leave. And show me err on workflow: can't connect to FTP or FTPs may be because sftp bla bla bla.
@WatchandLearnTutorials
@WatchandLearnTutorials 3 жыл бұрын
I would not deploy MERN stack on shared hosting, you need to use something like AWS, Digital Ocean etc.
@MilanDrazic
@MilanDrazic 3 жыл бұрын
@@WatchandLearnTutorials I deploy server on heroku and front on shared host But problem is that client need to have github.
@WatchandLearnTutorials
@WatchandLearnTutorials 2 жыл бұрын
@@MilanDrazic I don't understand this question?
@phantasythenoob
@phantasythenoob 2 жыл бұрын
How do I set production as default root directory
@bimasakti-nb2el
@bimasakti-nb2el 3 жыл бұрын
what if I added a .gitignore file in my project (I currently using laravel), the "vendor" folder cant be uploaded to my GitHub project because I ignore that folder in the .gitignore file. this can be a problem for my application whos required that "vendor" folder. any solution pls?
@WatchandLearnTutorials
@WatchandLearnTutorials 3 жыл бұрын
Well yeah. This video is mostly for static already prebuilt sites. Technically you can use this method but you shouldn't ignore vendor files then. Install them with composer and just push everything. Because a lot of shared hostings don't even have composer installed so you can't install them on the server. I think much better solution would be to use something like Digital Ocean or something like Cloudways which is made for PHP apps. I have a video about it here: kzbin.info/www/bejne/Z2OaZqGsabyroc0 ... I'm not into Laravel anymore but AFAIK there are apps you can use for better CI/CD experience like forge.laravel.com/ this is specifically made for Laravel deployments, so that maybe right solution for you.
@CodePopular
@CodePopular 2 жыл бұрын
Error: Deploy {"code":421,"message":"connect: Sorry, cleartext sessions and weak ciphers are not accepted on this server. Please reconnect using TLS security mechanisms."}
@umahatokula9586
@umahatokula9586 3 жыл бұрын
Is it my FTP credentials from cpanel I will enter in github secret?
@ShaunEk1
@ShaunEk1 3 жыл бұрын
Yes, get the ftp info from your hosting provider and put that in as secrets in GitHub
@fadjristudio6804
@fadjristudio6804 Жыл бұрын
Is there is no setup in shared hosting ? Is it secure ?
@WatchandLearnTutorials
@WatchandLearnTutorials Жыл бұрын
It's secure as if you are uploading something to your server manually via FTP.
@petarblazevic397
@petarblazevic397 3 жыл бұрын
Can you make tutorial how to deploy strapi on cpanel shared hosting and connect to database on cpanel
@WatchandLearnTutorials
@WatchandLearnTutorials 3 жыл бұрын
I have an episode about deploying Strapi to shared hosting: kzbin.info/www/bejne/m5O6e5WYirlniqM however I would advise against that because Strapi or most of Node apps just don't work very well on shared hosting... at least not mine, as you would be able to see in the video mentioned above. Better deploy it to Digital Ocean, AWS, or some other similar service.
@petarblazevic397
@petarblazevic397 3 жыл бұрын
@@WatchandLearnTutorials is there a service where you could deploy strapi for backend, database, nextjs frontend and mail server? I was looking into firebase but i doesn't have mail server. Now i have cpanel on shared hosting, but as you sad it would be better on none shared.
@WatchandLearnTutorials
@WatchandLearnTutorials 3 жыл бұрын
@@petarblazevic397 You can deploy everything to Digital Ocean, AWS, Vultr, Hetzner or similar service, what you need is VPS. They can be a bit pricey, AFAIK Hetzner is most affordable, however you would need some devops skillis to set everything up, these services won't do that for you. However, Digital Ocean has "one click" installation for Strapi, so you can try that ( marketplace.digitalocean.com/apps/strapi ). You can get $20 for Digital Ocean from this video: kzbin.info/www/bejne/f5zXn6iKbrqamK8
@kacperkepinski4990
@kacperkepinski4990 8 ай бұрын
what if this is react app?
@WatchandLearnTutorials
@WatchandLearnTutorials 7 ай бұрын
You would need to add a build step, or you could build it locally and just push that since that way you just get a static site. If it's a framework like Next.js with SSR then this would need to be more involved and also you probably wouldn't be able to host it on a shared hosting.
@padmakarkasture2969
@padmakarkasture2969 3 жыл бұрын
how to setup on server side ftp to use github action
@WatchandLearnTutorials
@WatchandLearnTutorials 3 жыл бұрын
You don't need any special setup, you just need to know where the files are going to be pushed, your username and password.
@jimmacdiarmid8230
@jimmacdiarmid8230 3 жыл бұрын
Great Tutorial! Thank you!
@WatchandLearnTutorials
@WatchandLearnTutorials 3 жыл бұрын
You are welcome 😀
@Alirezamxz
@Alirezamxz 3 жыл бұрын
Great Tutorial! Thank you!
@WatchandLearnTutorials
@WatchandLearnTutorials 3 жыл бұрын
Thank you for watching 😀
Automatic Deployments On Shared Hosting
13:56
Watch and Learn
Рет қаралды 21 М.
Laravel deployment with GitHub Actions
49:45
Philo Hermans
Рет қаралды 24 М.
Когда отец одевает ребёнка @JaySharon
00:16
История одного вокалиста
Рет қаралды 12 МЛН
Стойкость Фёдора поразила всех!
00:58
МИНУС БАЛЛ
Рет қаралды 7 МЛН
1 сквиш тебе или 2 другому? 😌 #шортс #виола
00:36
How I Turned a Lolipop Into A New One 🤯🍭
00:19
Wian
Рет қаралды 10 МЛН
GitHub Actions для CI/CD - mini курс за 30 минут
35:18
PurpleSchool | Anton Larichev
Рет қаралды 27 М.
How GitHub Actions 10x my productivity
8:18
Beyond Fireship
Рет қаралды 427 М.
Про GitHub Actions за 10 минут
10:12
Merion Academy
Рет қаралды 29 М.
Automatic Deployment With Github Actions
43:26
Traversy Media
Рет қаралды 177 М.
Dockerize Next.js & Deploy to VPS (EASY!)
19:43
ByteGrad
Рет қаралды 62 М.
Automate your GitHub Actions Releases (with Semantic Release)!
23:39
Dave's Dev Channel
Рет қаралды 33 М.
5 Ways to DevOps-ify your App - Github Actions Tutorial
12:12
Fireship
Рет қаралды 693 М.
Never* use git pull
4:02
Philomatics
Рет қаралды 515 М.
Когда отец одевает ребёнка @JaySharon
00:16
История одного вокалиста
Рет қаралды 12 МЛН