# 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
