stages:
  - build
  - deploy

variables:
  PIPELINE_WORK_DIR: "./"
  DOCKERFILE_PATH: "./"
  BUILD_NAME: "enruta_web_dashboard"
  CONTAINER_NAME: "enruta-web_dashboard"
  VITE_API_URL: "https://api.etaviaporte.com/api"
  PUBLIC_PORT: 8000
  PRIVATE_PORT: 8000

build-job:
  stage: build
  script:
    - . ./scripts/ci_functions.sh
    - build_static
  artifacts:
    paths:
      - $PIPELINE_WORK_DIR/$BUILD_NAME.zip
    expire_in: 1 week
  only:
    - master

deploy-job:
  stage: deploy
  script:
    - . ./scripts/ci_functions.sh
    - deploy
  only:
    - master
