1
0
Fork 0
forked from ilot/ilot-io

Attempt better way

This commit is contained in:
Antoine Martin 2024-06-15 00:35:44 -04:00
parent 146b1589f1
commit 613af523ab
Signed by: ayakael
GPG key ID: D62A472A4AA7D541
2 changed files with 17 additions and 4 deletions

View file

@ -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
View file