mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-26 03:41:01 +00:00
Add preview deployments for docs for pull-requests (#820)
This commit is contained in:
parent
4cfe01b078
commit
50d5c53cf6
1 changed files with 23 additions and 2 deletions
|
@ -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"
|
||||
|
||||
|
|
Loading…
Reference in a new issue