mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-07-19 17:49:40 +00:00
Add preview deployments for docs for pull-requests (#820)
This commit is contained in:
parent
4cfe01b078
commit
50d5c53cf6
@ -7,7 +7,26 @@ pipeline:
|
|||||||
- yarn build
|
- yarn build
|
||||||
when:
|
when:
|
||||||
event: [push, pull_request]
|
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:
|
deploy:
|
||||||
image: alpine:3.14.2
|
image: alpine:3.14.2
|
||||||
@ -33,5 +52,7 @@ pipeline:
|
|||||||
when:
|
when:
|
||||||
event: push
|
event: push
|
||||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
||||||
path: "docs/**"
|
path:
|
||||||
|
- "docs/**"
|
||||||
|
- ".woodpecker/docs.yml"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user