mirror of
https://codeberg.org/Codeberg/Documentation.git
synced 2026-08-15 14:53:29 -07:00
37 lines
1,019 B
YAML
37 lines
1,019 B
YAML
when:
|
|
- event: pull_request
|
|
|
|
steps:
|
|
change-path:
|
|
image: alpine
|
|
commands:
|
|
- |
|
|
sed -i.orig -e "s~pathPrefix: '/'~pathPrefix: '/documentation/pull_${CI_COMMIT_PULL_REQUEST}/'~" eleventy.config.mjs
|
|
|
|
build:
|
|
image: codeberg.org/woodpecker-plugins/node-pm
|
|
settings:
|
|
run: build
|
|
with: pnpm
|
|
frozen_lockfile: true
|
|
ignore_node_modules: true
|
|
depends_on: change-path
|
|
|
|
deploy-preview:
|
|
image: codeberg.org/gedankenstuecke/git-pages-woodpecker-plugin:v2
|
|
settings:
|
|
SITE_URL: https://codeberg.codeberg.page/documentation
|
|
PATH: pull_${CI_COMMIT_PULL_REQUEST}
|
|
TOKEN:
|
|
from_secret: surge_forge_token
|
|
UPLOAD_DIR: _site
|
|
depends_on: build
|
|
|
|
comment:
|
|
image: mcs94/gitea-comment
|
|
settings:
|
|
gitea_address: https://codeberg.org
|
|
gitea_token:
|
|
from_secret: surge_forge_token
|
|
comment: 'Preview ready: https://codeberg.codeberg.page/documentation/pull_${CI_COMMIT_PULL_REQUEST}'
|
|
depends_on: deploy-preview
|