Add preview deployments for docs for pull-requests (#820)

This commit is contained in:
Anbraten 2022-03-23 10:31:12 +01:00 committed by GitHub
parent 4cfe01b078
commit 50d5c53cf6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,7 +7,26 @@ pipeline:
- yarn build
when:
event: [push, pull_request]
path: "docs/**"
path:
- "docs/**"
- ".woodpecker/docs.yml"
deploy-preview:
image: woodpeckerci/plugin-surge-preview:next
settings:
path: "docs/build/"
surge_token:
from_secret: SURGE_TOKEN
forge_type: github
forge_url: "https://github.com"
forge_repo_token:
from_secret: GITHUB_TOKEN_SURGE
when:
event: pull_request
path:
- "docs/**"
- ".woodpecker/docs.yml"
# TODO: add step to remove preview again after PR is closed (waiting for #286)
deploy:
image: alpine:3.14.2
@ -33,5 +52,7 @@ pipeline:
when:
event: push
branch: ${CI_REPO_DEFAULT_BRANCH}
path: "docs/**"
path:
- "docs/**"
- ".woodpecker/docs.yml"