'How do I deploy plain PHP site (no framework used)

Wrote a tiny project containing about 5 files with vanilla PHP and Js. This means I have no composer.json & no .htaccess files, no database. Just a POST request to a script(php).

Tried deploying on Heroku but couldn't. Got the error below

-----> Building on the Heroku-20 stack
-----> Using buildpack: heroku/php
-----> App not compatible with buildpack: https://buildpack- 
registry.s3.amazonaws.com/buildpacks/heroku/php.tgz
       
!     ERROR: Application not supported by this buildpack!
!     
!     The 'heroku/php' buildpack is set on this application, but was
!     unable to detect a PHP codebase.
!     
!     A PHP app on Heroku requires a 'composer.json' at the root of
!     the directory structure, or an 'index.php' for legacy behavior.
!     
!     If you are trying to deploy a PHP application, ensure that one
!     of these files is present at the top level directory.
!     
!     If you are trying to deploy an application written in another
!     language, you need to change the list of buildpacks set on your
!     Heroku app using the 'heroku buildpacks' command.
!     
!     For more information, refer to the following documentation:
!     https://devcenter.heroku.com/articles/buildpacks
!     https://devcenter.heroku.com/articles/php-support#activation
      More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
!     Push failed


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source