Job 'build' uploads artifact 'web-dist'. Job 'deploy' has needs: [build]. How should deploy obtain the files?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Artifacts share files across jobs in a run: upload in producer, download-artifact in consumer after needs.
Full explanation below image
Full Explanation
Jobs do not share workspaces. actions/upload-artifact in build and actions/download-artifact in deploy is the supported pattern. needs ensures ordering. Job outputs are for small string values, not full dist trees. Same-run download is the primary use case; downloading from other runs requires explicit run-id patterns and is restricted. Runners do not expose a durable /artifacts mount across jobs. Set retention-days appropriately for compliance and storage costs.