Skip to content
Snippets Groups Projects
Commit e8a67425 authored by Grant's avatar Grant
Browse files

Merge branch '151-doc-wiki' into 'main'

Documentation wiki

Closes #151

See merge request !54
parents 07e5f9a8 7e9b372c
No related branches found
No related tags found
1 merge request!54Documentation wiki
Pipeline #155 failed
stages:
- publish
- deploy
include:
- local: ".gitlab/ci/wiki.yml"
rules:
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH'
- changes:
- doc/**/*
- local: ".gitlab/ci/deploy.yml"
rules:
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH'
- changes:
# exclude documentation changes from deploy
- "doc/**/*"
- ".gitlab/*"
when: never
variables:
REGISTRY: registry.sc07.dev
IMAGE_NAME: sc07/canvas:edge
publish:
stage: publish
tags:
- red
rules:
- if: $CI_COMMIT_BRANCH == "main"
- changes:
- ".gitlab/*"
when: never
- changes:
- "**/*.md"
when: manual
interruptible: true
before_script:
- echo $PAT | docker login $REGISTRY -u $GITLAB_USER_LOGIN --password-stdin
script:
- docker build . --tag $REGISTRY/$IMAGE_NAME
- docker push $REGISTRY/$IMAGE_NAME
deploy:
stage: deploy
tags:
- red
rules:
- if: $CI_COMMIT_BRANCH == "main"
- changes:
- ".gitlab/*"
when: never
- changes:
- "**/*.md"
when: manual
# dummy job, gitlab gets mad when no jobs exist (when the above are never imported)
dummy:
stage: build
interruptible: true
script:
- cd $WORK_DIR
- docker compose pull
- docker compose up -d
- echo "dummy"
# rules:
# - when: never
variables:
REGISTRY: registry.sc07.dev
IMAGE_NAME: sc07/canvas:edge
publish:
stage: publish
tags:
- red
rules:
- changes:
- "**/*.md"
when: manual
interruptible: true
before_script:
- echo $PAT | docker login $REGISTRY -u $GITLAB_USER_LOGIN --password-stdin
script:
- docker build . --tag $REGISTRY/$IMAGE_NAME
- docker push $REGISTRY/$IMAGE_NAME
deploy:
stage: deploy
tags:
- red
rules:
- changes:
- "**/*.md"
when: manual
interruptible: true
script:
- cd $WORK_DIR
- docker compose pull
- docker compose up -d
# sync /doc/ to internal wiki repo for UI access
# see #151
build-wiki:
image: alpine
stage: build
before_script:
- apk add --no-cache git git-subtree
script:
- git config user.email "ci@sc07.company"
- git config user.name "ci"
- git remote remove gitlab-wiki || true
- git remote add gitlab-wiki "https://ci:$CI_TOKEN@sc07.dev/sc07/canvas.wiki.git"
- git status
- git checkout main
- git pull
- git push gitlab-wiki `git subtree split -P doc main`:main --force
# Canvas
Documentation example
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment