forked from ilot/ilot-io
Attempt better way
This commit is contained in:
parent
146b1589f1
commit
613af523ab
2 changed files with 17 additions and 4 deletions
|
@ -7,11 +7,24 @@ pages:
|
|||
stage: deploy
|
||||
script:
|
||||
- ikiwiki --setup ikiwiki.setup
|
||||
- echo "Pages accessible through ${CI_PAGES_URL}/${CI_COMMIT_BRANCH}"
|
||||
- echo "Pages accessible through ${CI_PAGES_URL}/${PAGES_PREFIX}"
|
||||
variables:
|
||||
PAGES_PREFIX: "" # no prefix by default (master)
|
||||
pages:
|
||||
path_prefix: "$PAGES_PREFIX"
|
||||
environment:
|
||||
name: "Pages ${PAGES_PREFIX}"
|
||||
url: "${CI_PAGES_URL}/${PAGES_PREFIX}"
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
||||
pages:
|
||||
path_prefix: "$CI_COMMIT_BRANCH"
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == "staging" # ensure to run on master (with default PAGES_PREFIX)
|
||||
variables:
|
||||
PAGES_PREFIX: '_stg' # prefix with _stg for the staging branch
|
||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event" # conditionally change the prefix on Merge Requests
|
||||
when: manual # run pages manually on Merge Requests
|
||||
variables:
|
||||
PAGES_PREFIX: 'mr$CI_MERGE_REQUEST_IID' # prefix with the mr<iid>, like `mr123`
|
||||
tags:
|
||||
- knit
|
||||
|
|
0
test
0
test
Loading…
Add table
Reference in a new issue