forked from ilot/ilot-io
30 lines
970 B
YAML
30 lines
970 B
YAML
before_script:
|
|
- sudo apk add git ikiwiki po4a perl-yaml-tiny
|
|
- git submodule init
|
|
- git submodule update
|
|
|
|
pages:
|
|
stage: deploy
|
|
script:
|
|
- ikiwiki --setup ikiwiki.setup
|
|
- 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
|
|
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
|