Github does not offer web site hosting; it will neither execute PHP nor Java. If you need client side technology only (i.e. JavaScript... or Flash, or Java
applets ;-) or similar) you could misuse a repository for this purpose. It works, e.g. 2048 is "hosted" there.
Of course there is no difference in usage of the repository for Java sources than for PHP sources. But that is not "deploying" which is simply not possible.