
Security News
ESLint Adds Official Support for Linting HTML
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
angular-cli-ghpages
Advanced tools
Angular CLI addon. Publish to any gh-pages branch on GitHub (or any other branch on any other remote).
Angular CLI addon. Publish to any gh-pages branch on GitHub (or any other branch on any other remote).
Made for Travis-CI. Brought to you by the angular2buch.de team!
This is NOT IgorMinar/angular-cli-github-pages. That addon is limited to the gh-pages
branch of the same repository.
In contrast to this, the Angular2Buch/angular-cli-ghpages addon is able to push to any branch on any repository. It's build on top of tschaub/gh-pages. This addon works great on Travis-CI. No git credentials must be set up in before. Specific environment variables of Travis-CI are evaluated, too.
This addon has the following prerequisites:
To install this addon run the following command:
npm install --save-dev angular-cli-ghpages
Run ng build
to fill the dist
folder.
Then execute ng ghpages
in order to deploy it.
Usage:
ng build
ng ghpages [OPTIONS]
By default, tschaub/gh-pages assumes that the current working directory is a git repository, and that you want to push changes to the origin
remote. If instead your script is not in a git repository, or if you want to push to another repository, you can provide the repository URL in the repo
option.
Auto-generated commit
The commit message, must be wrapped in quotes.
Hardcoded additional text is always added, if the environment variable process.env.TRAVIS
exists (for Travis CI).
Example:
ng ghpages --message="What could possibly go wrong?"
gh-pages
The name of the branch you'll be pushing to. The default uses GitHub's gh-pages
branch, but this can be configured to push to any branch on any remote.
git config user.name
and git config user.email
If you are running the command in a repository without a user.name
or user.email
git config properties (or on a machine without these global config properties), you must provide user info before git allows you to commit. In this case provide both name
and email
string values to identify the committer.
true
(boolean)Suppress logging. With silent true
log messages are suppressed and error messages are sanitized.
This option should be used if the repository URL or other information passed to git commands is sensitive and should not be logged. By default the silent mode is enabled to avoid sensitive data exposure.
dist
Directory for all sources, relative to the project-root.
Monst probably no change is required here.
For your convenience, the addon will recognize the environment variable GH_TOKEN
and will replace this pattern in the --repo
string. Please do NOT disable the silent mode if you have credentials in the repository URL! Read more about Github tokens here.
In example, the following command runs on our Travis-CI:
ng build --environment=production
ng ghpages --repo=https://GH_TOKEN@github.com/organisation/your-repo.git --name="Displayed Username" --email=mail@example.orf
You have to treat the GH_TOKEN as secure as a password!
Code released under the MIT license.
FAQs
Deploy your Angular app to GitHub Pages or Cloudflare Pages directly from the Angular CLI (ng deploy)
The npm package angular-cli-ghpages receives a total of 6,727 weekly downloads. As such, angular-cli-ghpages popularity was classified as popular.
We found that angular-cli-ghpages demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
Security News
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.