Extract index build code from publish:github task
Fix typos
Output index file in github:publish task