diff --git a/backend/secfit/.gitlab-ci.yml b/backend/secfit/.gitlab-ci.yml index 9c724ff505afdaa8726a4e380c1511c4a42cb747..248765894b04c19715c1fa9f6b5fb0248d2ed412 100644 --- a/backend/secfit/.gitlab-ci.yml +++ b/backend/secfit/.gitlab-ci.yml @@ -1,18 +1,21 @@ build: stage: build script: - - apt-get add postgresql-dev --no-cache + - apt-get clean - pip install -r backend/secfit/requirements.txt + cache: + paths: + - ~/.cache/pip/ + services: + - postgres:latest deploy: - stage: deploy - image: python:3.8.5-slim script: - - git remote add heroku https://heroku:$HEROKU_API_KEY@git.heroku.com/secfit-group15.git - - git push heroku master - - echo "Deployed to Staging Server https://secfit-group15.herokuapp.com" - environment: - name: staging - url: https://secfit-group15.herokuapp.com/ + - apt-get update -qy --allow-insecure-repositories + - apt-get install -y ruby-dev + - apt-get install git -yqq + - apt-get install curl -y + - gem install dpl + - dpl --provider=heroku --app=tdt4242-backend --api-key=$HEROKU_API_KEY --skip_cleanup only: - master