wrenix.eu/.woodpecker/page.yml
2023-06-22 22:48:59 +02:00

38 lines
No EOL
1 KiB
YAML

clone:
git:
image: woodpeckerci/plugin-git
recursive: true
submodule_override:
public: https://codeberg.org/wrenix/pages.git
pipeline:
'build: page':
image: "ghcr.io/getzola/zola:v0.17.2"
when:
event: push
branch:
- main
commands:
- zola build
'publish: page':
image: "docker.io/node"
when:
event: push
branch:
- main
secrets:
- "ssh_private_key_write"
commands:
- eval $(ssh-agent -s)
- echo $${SSH_PRIVATE_KEY_WRITE} | base64 -d | ssh-add -
- mkdir -p ~/.ssh && chmod 700 ~/.ssh && ssh-keyscan codeberg.org >> ~/.ssh/known_hosts
# Git configuration
- git config --global user.email "woodpecker@ci"
- git config --global user.name "Woodpecker CI"
# Needed for custom domains
- "[ -f .domains ] && cp .domains public"
# Commit and push all static files with pipeline started timestamp
- cd public
- git add .
- git commit -m "Woodpecker CI ${CI_BUILD_CREATED}"