I have setup CI/CD pipeline for my blog! | Anjan Dutta
I’ve setup CI/CD pipeline for my blog! And it’s amazing!
For a context, the blog is a static site built with Gatsby. And, there is no CMS to manage the content from the “backend”.
To be honest, now that I have set up the deployment pipeline, I don’t need one in near future.
But I am feeling amazingly good about it!
If you ask me what is the difference?
Well, I used to publish my blog articles but now I commit them!
It’s not a choice, it’s a requirement.
In Gatsby, every article is a markdown formatted document.
To publish any article, we build the project and deploy the files.
So, unless there is a pipeline in place, you have to build the project every time after writing new content. Then upload the bundle in the assigned s3 bucket.
Now, all I have to do is to open the terminal:
git add .
git commit -m "article names"
git push origin bucket_name
The AWS CodePipeline handles rest of the steps:
- The code is pushed into a AWS CodeCommit repository.
- Every new commit initiates a new build.
- Next, AWS CodeBuild runs the build command and creates an artifact.
- The Artefact is then pushed to s3 bucket.
Automated it all.
I am sure, I am not the only one to follow this path. But as a developer, looking at my blog now, it feels more complete.
Now I can focus only on the content because I have one less thing to worry about.
Thanks for reading!
Originally published at https://anjandutta.com.