How to deploy Next.js app to Hostinger shared hosting and alsoadd a github workflow (ci/cd)
The article provides a guide on deploying a Next.js application to Hostinger shared hosting using GitHub Actions for continuous integration and deployment. It outlines the necessary steps, including configuring the Next.js project for static export and setting up FTP credentials. The workflow automates the build and deployment process, allowing users to update their site easily.
- ▪Users must change their Next.js project to static export mode for GitHub to build it into HTML/CSS/JS files.
- ▪The article details how to create a GitHub Actions workflow that triggers on pushes to the main branch.
- ▪Once the deployment workflow is set up, users can watch the live build progress on their GitHub repository page.
Opening excerpt (first ~120 words) tap to expand
try { if(localStorage) { let currentUser = localStorage.getItem('current_user'); if (currentUser) { currentUser = JSON.parse(currentUser); if (currentUser.id === 1448685) { document.getElementById('article-show-container').classList.add('current-user-is-article-author'); } } } } catch (e) { console.error(e); } Abdulsalam Abdulrahman (Amtech Digital) Posted on May 19 How to deploy Next.js app to Hostinger shared hosting and alsoadd a github workflow (ci/cd) #cicd #githubactions #nextjs #tutorial How to deploy Next.js app to Hostinger shared hosting and alsoadd a github workflow (ci/cd) You can bypass Hostinger's limitations entirely by building your application on GitHub Actions and automatically deploying the static files via FTP/SFTP.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at DEV.to (Top).