mirror of
https://codeberg.org/Codeberg-CI/examples.git
synced 2025-09-08 19:35:00 -04:00

I've been able to successfully make a NodeJS based CI solution to build pages for a static site using eleventy ([11ty.dev](https://11ty.dev)). ## Overview This process will make use of the following - Source repo to contain the source code - Destination repo that will be used to serve the pages - Codeberg CI (early access) - Secrets within the CI ## How it works Currently the `.Woodpecker.yml` file will live in your source codes repo, and have the build commands. Find more [here](https://codeberg.org/cjerrington/eleventy-base-blog-source/src/branch/main/.woodpecker.yml). For the CI we will start by using the node image, setup the secrets, and build commands. The use of secrets keeps your information secured and only accessed by the build system. This is beneficial for the email and access token. During the build, the pipeline will clone the source repo, then move into our commands. We will use the default build dir by 11ty of `_site`. The pipeline will clone our destination repo as _site, then set the remote url for the push after we run our install and build. Once built, it will change directory to the build site and perform our commit and push. ## Accessing the site On the remote repo we need the default repo to be named pages. This is also houw [Codeberg Pages](https://docs.codeberg.org/codeberg-pages/) setups up the access to what serves the pages we just built. You can follow their documentation on how to access your build site based on `username.codeberg.page`. Co-authored-by: Clayton Errington <me@claytonerrington.com> Co-authored-by: 6543 <6543@obermui.de> Reviewed-on: https://codeberg.org/Codeberg-CI/examples/pulls/23 Reviewed-by: 6543 <6543@obermui.de> Co-authored-by: Clayton Errington <cjerrington@noreply.codeberg.org> Co-committed-by: Clayton Errington <cjerrington@noreply.codeberg.org>
examples
Example Woodpecker pipeline files (WIP). Pull requests are accepted/welcome.
Example pipeline files
Link | Language | Build System | Comments |
---|---|---|---|
C/make.yml | C | Make | Simple ci for building a Make based C project |
C/meson.yml | C/C++ | meson | CI for meson-based projects. |
C/meson-android.yml | C/C++ | meson + Android NDK | CI for meson-based projects cross-compiling to Android NDK. |
golang/build.yml | golang | golang | Simple ci for building and test a Go project |
golang/build-docker.yml | golang | golang / kaniko | CI to build golang project and build various docker container and publish them on DockerHub |
Jekyll/jekyll.yml | Markdown | Jekyll | CI step to build static website files and publish them to Codeberg Pages using Jekyll |
Hugo/hugo.yml | Markdown | Hugo | CI step to build static website files and publish them to Codeberg Pages with Hugo |
Docker/kaniko.yml | Dockerfile | Kaniko | Minimalistic CI pipeline with clear instructions to push a Docker image |
Docker/buildx.yml | Dockerfile | buildx | Build and publish Docker images for multiple architectures on codeberg |
Python/.woodpecker.yml | Python | Python venv | Standard CI pipeline to test Python packages code on multiple Python distributions. For details check serial-sphinx |
Rust/.woodpecker.yml | Rust | cargo | Simple CI pipeline to run cargo commands |
tectonic/.woodpecker.yml | LaTeX | Tectonic | Builds a TeX file and pushes the resulting PDF file to a given repository. |
NodeJS/11ty.yml | JavaScript | NodeJS | CI to build static websites files and publish them to Codeberg Pages with 11ty |
More:
Description
Languages
Dockerfile
52.8%
Shell
47.2%