openpgp-notes/.woodpecker/doc-pages.yml

33 lines
1 KiB
YAML
Raw Normal View History

2023-09-15 14:19:08 +02:00
steps:
2023-09-15 14:01:36 +02:00
pages:
image: woodpeckerci/plugin-docker-buildx
settings:
output: type=local,dest=public
# do not push, push cannot be used with output simultaneously anyway
dry_run: true
# do not refresh image
pull_image: false
purge: false
pages-publish:
image: bitnami/git
secrets: [ codeberg_token ]
commands:
2023-09-15 14:02:26 +02:00
- git config --global user.email heiko@schaefer.name
2023-09-15 14:01:36 +02:00
- git config --global user.name "Page Renderer"
- git clone -b pages https://$CODEBERG_TOKEN@codeberg.org/openpgp/test.git $CI_REPO_NAME
- cp -ar public/. $CI_REPO_NAME/
# Needed for custom domains
- cp .domains $CI_REPO_NAME || true # Ignore if it doesn't exist
- cd $CI_REPO_NAME
- >
if [ -z "$(git status --porcelain)" ]; then
echo "No changes"
else
git add .
git commit -m "Update rendered page" -m "Source: $CI_COMMIT_SHA" -m "See: $CI_BUILD_LINK"
git push
fi
when:
event: push