neilhanlon.me/.woodpecker.yml
neil c9075ec215
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
test post (#1)
Co-authored-by: Neil Hanlon <neil@shrug.pw>
Reviewed-on: #1
2022-11-14 14:43:47 +00:00

46 lines
963 B
YAML

---
branches: main
clone:
git:
image: woodpeckerci/plugin-git
settings:
recursive: true
pipeline:
build:
image: registry.gitlab.com/pages/hugo/hugo_extended:latest
commands:
- hugo
preview:
image: woodpeckerci/plugin-surge-preview
secrets: [SURGE_TOKEN, SURGE_GITEA]
settings:
path: public
surge_token:
from_secret: SURGE_TOKEN
forge_type: gitea
forge_url: https://git.shrug.pw
forge_repo_token:
from_secret: SURGE_GITEA
when:
event: pull_request
publish:
image: git.shrug.pw/neil/containers/woodpecker-ci:latest
secrets: [ssh_key]
environment:
- GIT_AUTHOR_NAME="Woody the Woodpecker"
- GIT_AUTHOR_EMAIL=ci@shrug.pw
commands:
- mkdir -p ~/.ssh/
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 0700 ~/.ssh/
- chmod 0600 ~/.ssh/id_rsa
- bash deploy.sh
when:
branch: main
event: [push]