What is the difference between cache and artifacts in GitHub Actions?
BeginnerConceptGitHub Actions
Answer
Cache is for speeding up repeated work across runs (dependencies, build outputs) and may be missing. Artifacts are the outputs of a specific run that you want to keep or pass to later jobs, and are guaranteed within that run. Use cache for node_modules-type data, artifacts for a built binary, test report or coverage output.
More on GitHub Actions
What are workflows, jobs, steps and actions in GitHub Actions?BeginnerWhat events can trigger a workflow?BeginnerWhat is the difference between `pull_request` and `pull_request_target`?AdvancedWhat is a runner, and how do GitHub-hosted and self-hosted runners differ?BeginnerHow do you pass data between steps and between jobs?IntermediateHow does a build matrix work?Intermediate