Skip to content
Snippets Groups Projects
.gitlab-ci.yml 766 B
Newer Older
# include:
#   - project: 'cokoapps/ci'
#     ref: main
#     file: 'ci-templates.yml'
variables:
  IMAGE_NAME_DEMO: $CI_REGISTRY/wax/wax-prosemirror/wax-demo
  BUILD_PATH: .
  - Build
  - Deploy
build demo:
  stage: Build
  image: docker:26
  services:
    - docker:26-dind
  before_script:
    - echo "$CI_REGISTRY_PASSWORD" | docker login "$CI_REGISTRY" -u "$CI_REGISTRY_USER" --password-stdin
  script:
    - docker build --tag $IMAGE_NAME_DEMO:$CI_COMMIT_SHA -f $BUILD_PATH/Dockerfile-production $BUILD_PATH
    - docker push $IMAGE_NAME_DEMO:$CI_COMMIT_SHA
  only:
    - master

pages:
  stage: Deploy
  image: $IMAGE_NAME_DEMO:$CI_COMMIT_SHA
  script:
    - cp -r /home/wax/_build public
  artifacts:
    paths:
      - public
  only:
    - master