diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2356bc38bf70bc80d43d819f96230f367c7e19e7..3f6eb6f6c017fec57cea7b28a08467b67a545234 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,6 +6,7 @@ services: stages: - build - test + - deploy before_script: - docker version @@ -33,3 +34,17 @@ test: - echo "Testing ..." - docker-compose -f docker-compose.ci.yml pull - docker-compose -f docker-compose.ci.yml run web sh -c "poetry run python manage.py makemigrations && poetry run python manage.py migrate && poetry run python manage.py test core -v 2" + +deploy: + stage: deploy + needs: + - test + script: + - echo "Deploying ..." + - cd ./the_social_network + - mw ./the_social_network ./not_needed + - mw ./core ./the_social_network + - pip install poetry + - poetry --version + - poetry config pypi-token.pypi __token__ $PYPI_TOKEN + - poetry publish