diff --git a/ci/pex-build.template.yml b/ci/pex-build.template.yml
index a0e60d3d412f939e61a94495e813ae88e1956889..ee9e6cf558578585efe9832bede3fede5f3e717c 100644
--- a/ci/pex-build.template.yml
+++ b/ci/pex-build.template.yml
@@ -3,7 +3,7 @@
     image: python:3.10
     script:
         - pip install build twine poetry pytest
-        - poetry build --with test ${PEX_PATH}
+        - cd ${PEX_PATH}; poetry build --with test ${PEX_PATH};cd -
         - pip install ${PEX_PATH}
         - NAME=$(awk -F' = ' '/^\[tool.poetry\]/ { project = 1; next } /^\[.*\]/ { project = 0 } project && $1 == "name" { gsub(/"/, "", $2); print $2 }' ${PEX_PATH}/pyproject.toml)
         - VERSION=$(sed -n 's/^__version__ = "\(.*\)\"$/\1/p' ${PEX_PATH}/*/__init__.py)