drone converts your yaml into a shell script that looks something like this:
#!/bin/sh
sh /projects/ops/scripts/yapi.sh
the pipeline completes when the shell script exits. If the pipeline does not exit, it would indicate the shell script is hanging. It is possible to background a process and still hang the shell.
for example, this shell script will hang indefinitely:
#!/bin/sh
python -m SimpleHTTPServer 8000 &
echo started
exit 0
there is also a stackoverflow topic that addresses this same situtation: