Solved this issue:
Anyone using angular 8 needs to supply the publish directory value by reading from the angular.json build outputPath which is dist/{project-name} and if you are using older versions, it should be dist which is the value of outDir that you can read from .angular-cli.json.
Thanks to User Dejazmach - Stack Overflow