As described on GitHub Pages docs you can host a static website directly from a GitHub repository.
This is done by pushing content to either master branch (for user or
organization website) or gh-pages branch (for a project website).
If you selected 'GitHub' as a hosting option while running the generator, here's what it will do:
- Initialize a git repository in the
distsubdirectory and make an empty commit to eithermasterorgh-pagesbranch. - Add remote git URL pointing to GitHub, where the website will be published to.
- Optionally create a
CNAMEfile in theappdirectory if you're using a custom domain, i.e. the website URL is different from*.github.io. - Initialize a git repository in the root folder,
the one you ran
yo mobilefrom. Let's call it 'the outer repo'.
Note that .gitignore
of the Web Starter Kit already contains dist directory. This allows you
to keep development files and production builds in separate repositories.
Whenever you want to publish changes to the website, simply run gulp deploy.
Behind the scenes, gulp deploy executes git push -u origin <branch>
from the dist directory, where <branch> is either master or gh-pages.