Use Woodpecker CI to add additional content to your built website

This tutorial describes how to use Woodpecker CI to add extra content to your website

Posted: 2024-04-16
Stats: 167 words / ~1 minute

Woodpecker CI is a simple and powerful CI/CD engine. In this tutorial I showed how to use it to automatically rebuild and publish a website on each push to a git repo.

In this tutorial I’ll show you how you can add extra content after building (e.g. an extra HTML file) so it’s not affected during build.

Prerequisites

You have a Woodpecker CI script which automaticaklly builds your website, for example the one I described in this tutorial, but you can use any other as well.

Getting started

In the step you commit to the repo, just add this line:

      - cp -a extra-content/. pages/

This simply copys everything from the extra-content folder to your website.

So if you want to add e.g. test/index.html, just put it to the extra-content folder of your website and you’re done!

End

You’re done 🎉!

If this was helpful, spread this article!

Related articles: Use Woodpecker CI to build your HUGO website

(This tutorial is my 4rd post at #100DaysToOffload challenge)

You can contact me if you wish to comment or propose a correction.