Skip to content

Commit

Permalink
Added latest tag
Browse files Browse the repository at this point in the history
  • Loading branch information
hatomist committed Oct 19, 2024
1 parent df9ae6c commit f724f4c
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ image: python:3.10

variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.pip-cache"
DOCS_IMAGE: $CI_REGISTRY_IMAGE/docs:$CI_COMMIT_TAG
DOCS_IMAGE: $CI_REGISTRY_IMAGE/docs

cache:
paths:
Expand All @@ -11,7 +11,7 @@ cache:
stages:
- build_docs
- build_docker
- publish
# - publish

build_docs:
stage: build_docs
Expand Down Expand Up @@ -77,19 +77,20 @@ build_docker:
COPY docs /usr/share/nginx/html/python
COPY nginx.conf /etc/nginx/nginx.conf
EOF
- docker build --pull -t $DOCS_IMAGE .
- docker push $DOCS_IMAGE
- docker build --pull -t $DOCS_IMAGE:$CI_COMMIT_TAG -t $DOCS_IMAGE:latest .
- docker push $DOCS_IMAGE:$CI_COMMIT_TAG
- docker push $DOCS_IMAGE:latest

publish:
stage: publish
only:
- tags
script:
- pip install --upgrade pip
- pip install build wheel
- python -m build --sdist --wheel --outdir dist/ .
- pip install twine
- TWINE_PASSWORD=${PYPI_API_TOKEN} TWINE_USERNAME=__token__ python -m twine upload dist/*
artifacts:
paths:
- dist/*
# publish:
# stage: publish
# only:
# - tags
# script:
# - pip install --upgrade pip
# - pip install build wheel
# - python -m build --sdist --wheel --outdir dist/ .
# - pip install twine
# - TWINE_PASSWORD=${PYPI_API_TOKEN} TWINE_USERNAME=__token__ python -m twine upload dist/*
# artifacts:
# paths:
# - dist/*

0 comments on commit f724f4c

Please sign in to comment.