Artifact or Cache?
The build job produces dist/, which the deploy job must use. Which mechanism is meant for that?
build
dist/
deploy
Choose one answer
Save dist/ in the dependency cache with a key based on the commit SHA.
Upload dist/ as an artifact in build and download it in deploy.
Commit dist/ back to the repository from the build job.
Nothing: jobs share their working directory automatically.