Hosting Operations
Check Whether Expected Build Outputs Exist
A deploy or packaging step cannot find files, and you need to verify the build output tree before debugging the deploy tool.
Command
find artifacts/dist -maxdepth 2 -type f | sort
What changed
Nothing changes. The build output files are listed.
Danger
safe
When to use it
Use when deploy, packaging, or static hosting steps complain about missing files.
When not to use it
Do not assume files are correct just because they exist; inspect sizes and content as needed.
Undo or recovery
No undo needed because this command is read-only.
Expected output
A sorted manifest of files under artifacts/dist.
demo script
Disposable terminal steps
cd /lab/ci-artifacts && find artifacts/dist -maxdepth 2 -type f | sortcd /lab/ci-artifacts && find artifacts/dist -maxdepth 2 -type f -printf '%s %p\n' | sort -nrcd /lab/ci-artifacts && test -f artifacts/dist/index.html && echo 'index present'
simulated output
What it looks like
::fixture-ready::
$ cd /lab/ci-artifacts && find artifacts/dist -maxdepth 2 -type f | sort
artifacts/dist/assets/main.js
artifacts/dist/assets/vendor.js
artifacts/dist/index.html
::exit-code::0
$ cd /lab/ci-artifacts && find artifacts/dist -maxdepth 2 -type f -printf '%s %p\n' | sort -nr
831488 artifacts/dist/assets/vendor.js
250880 artifacts/dist/assets/main.js
77 artifacts/dist/index.html
::exit-code::0
$ cd /lab/ci-artifacts && test -f artifacts/dist/index.html && echo 'index present'
index present
::exit-code::0
YouTube Short
Prove the build output exists.
Before blaming deploy, check the build output. Missing files upstream become deploy failures downstream.
LinkedIn hook
The deploy failed because the build never produced the file.
Question: Do you verify build outputs before debugging deploy failures?
experiments
A/B tests to run
Metric: linkedin_comment_rate
A: The deploy failed because the build never produced the file.
B: Check dist before blaming deploy.