Programs
Running a program from the command line is more nuanced than it looks, the shell has to first figure out where the program you typed actually lives.
PATH
When you type ls, the shell doesn't magically know where the ls program is, it searches a list of directories stored in an environment variable called PATH:
echo $PATH
# /usr/local/bin:/usr/bin:/bin
which ls
# /usr/bin/ls, the first match found while searching PATH in order
PATH is a colon-separated list of directories, the shell checks each one in order until it finds an executable file with that name. This is why installing a new tool sometimes requires adding its folder to PATH, otherwise typing its name does nothing but "command not found".
Running local scripts
A script in your current directory is deliberately not found automatically, even if you're standing right next to it, this is a safety feature so a malicious file named ls sitting in a random folder can't silently hijack your commands:
./deploy.sh # explicit "run the file right here", the ./ is required
bash deploy.sh # or, explicitly hand it to the bash interpreter
Executable permission
A script also needs the executable bit set before ./ will run it (more on permissions two lessons from now):
chmod +x deploy.sh
./deploy.sh
Without chmod +x, you'll get a "permission denied" error even though the file exists and is readable.