2021-09-11 15:10:32 +00:00
|
|
|
clone:
|
|
|
|
git:
|
|
|
|
image: plugins/git:next
|
|
|
|
|
|
|
|
branches: master
|
|
|
|
|
|
|
|
pipeline:
|
|
|
|
deploy-docs:
|
|
|
|
image: node:14-alpine
|
|
|
|
secrets:
|
|
|
|
- BOT_PRIVATE_KEY
|
|
|
|
environment:
|
|
|
|
- USE_SSH=true
|
|
|
|
- GIT_USER=woodpecker-bot
|
|
|
|
- DEPLOYMENT_BRANCH=master
|
|
|
|
commands:
|
2021-09-11 15:16:26 +00:00
|
|
|
- apk add openssh-client git
|
2021-09-11 15:10:32 +00:00
|
|
|
- mkdir -p $HOME/.ssh
|
|
|
|
- ssh-keyscan -t rsa github.com >> $HOME/.ssh/known_hosts
|
2021-09-11 15:16:26 +00:00
|
|
|
- echo "$BOT_PRIVATE_KEY" > $HOME/.ssh/id_rsa
|
2021-09-11 15:10:32 +00:00
|
|
|
- chmod 0600 $HOME/.ssh/id_rsa
|
2021-09-11 16:48:52 +00:00
|
|
|
- git config --global user.email "woodpecker-bot@obermui.de"
|
|
|
|
- git config --global user.name "woodpecker-bot"
|
2021-09-11 15:10:32 +00:00
|
|
|
- cd docs/
|
|
|
|
- yarn install --frozen-lockfile
|
|
|
|
- yarn deploy
|
|
|
|
when:
|
|
|
|
event: push
|
|
|
|
branch: master
|
2021-09-21 04:18:43 +00:00
|
|
|
path: "docs/**"
|
2021-09-11 15:10:32 +00:00
|
|
|
|
|
|
|
build-docs-pr:
|
|
|
|
image: node:14-alpine
|
|
|
|
commands:
|
|
|
|
- cd docs/
|
|
|
|
- yarn install --frozen-lockfile
|
|
|
|
- yarn build
|
|
|
|
when:
|
|
|
|
event: [pull_request]
|
2021-09-21 04:18:43 +00:00
|
|
|
path: "docs/**"
|