1
0 Comments

Automate Your Deployment Workflow: Continuously Deploying Next.js Website to DigitalOcean Using GitHub Actions

When I updated my website, I found hosting it on Vercel to be simple. I particularly appreciated that the changes were deployed automatically after I pushed them to the main branch. However, I already had a DigitalOcean droplet where the Django admin part of the website was running. So, I deployed my blog there. Unfortunately, I no longer had access to the convenient Continuous Deployment (CD) pipeline.

After some research, I created a custom CD pipeline for my blog using GitHub Actions, which works just as well. I didn't want to spend time figuring out how to set this up with Docker, so I chose a simpler solution of pushing the built files from GH Actions to the server using rsync.

I documented the steps in a tutorial, and I hope it will be helpful to anyone looking to deploy their website to DigitalOcean or any other remote server.

Automate Your Deployment Workflow: Continuously Deploying Next.js Website to DigitalOcean Using GitHub Actions.

on March 15, 2023