Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Chapter 1

While the official documentation eventually got me to where I needed, I think I can lay out a more direct path here. This documentation made it look like the process would be more manual/ static than it has to be.

This blog post looked good, but I was able to do something simpler with this plugin.

Keep it simple

This plugin makes the process pretty trivial. With it, you simply make your site and set the target directory in the config.

SSG based on node

# .woodpecker/build.yml
steps:
  - name: build
    when:
      event: [push, pull_request]
    image: node
    commands:
      - npm ci
      - npm run build
  - name: deploy
    image: codeberg.org/xfix/plugin-codeberg-pages-deploy:1
    settings:
      folder: docs
      ssh_key:
        from_secret: ssh_key

SSG built with mdbook (Rust)

steps:
  - name: build
    when:
      event: [push, pull_request]
    image: rust
    commands:
      - curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
      - cargo binstall mdbook
      - mdbook build
  - name: deploy
    image: codeberg.org/xfix/plugin-codeberg-pages-deploy:1
    settings:
      folder: book
      ssh_key:
        from_secret: ssh_key

That curl command comes from binstall documentation