# This file is a template, and might need editing before it works on your project.
# Full project: https://gitlab.com/pages/doxygen
image: alpine

documentation:
  variables:
    GIT_STRATEGY: clone
  stage: build
  script:
    - mkdir -p docs
    - python asn2md.py docs `find . -iname '*.asn'`
    - git add docs/*.md
    - git commit -m "Documentation update"
    - git remote rm origin && git remote add origin https://gitlab-ci-token:$CI_DOC_TOKEN@forge.etsi.org/rep/$CI_PROJECT_PATH.git
    - git push origin HEAD:$CI_COMMIT_REF_NAME # Pushes to the same branch as the trigger
  only:
    changes:
      - ./*.asn
#  artifacts:
#    paths:
#    - docs/*
