Publish files from one job for later download or deploy.

Section: Speed and portability

Upload build artifacts

yaml
yaml
- uses: actions/upload-artifact@v4
  with:
    name: web-dist
    path: dist/
Explanation

Artifacts decouple build jobs from deployment jobs and provide downloadable outputs for debugging.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Speed and portability
Cache npm dependencies in GitHub Actions
Reuse package manager downloads between runs.
OpenIn sheetyamlsame section
GitLab cache vs artifacts
Use cache for dependencies and artifacts for outputs.
OpenIn sheetyamlsame section
GitHub Actions test matrix
Run the same job across multiple Node versions.
OpenIn sheetyaml1 tag match
GitLab matrix variables
Expand one logical job into multiple combinations.
GitHub reusable workflow
Call a shared workflow from another repository or workflow file.