diff --git a/docs/README_standalone.md b/docs/README_standalone.md index f974948..1bb452d 100644 --- a/docs/README_standalone.md +++ b/docs/README_standalone.md @@ -88,6 +88,16 @@ and that you want to push changes to the `origin` remote. If instead, your files are not in a git repository, or if you want to push to another repository, you can provide the repository URL in the `repo` option. +#### --remote + +- **optional** +- Default: `origin` +- Example: `npx angular-cli-ghpages --remote=github` + +By default, **gh-pages** assumes that the current working directory is a git repository, +and that you want to push changes to the `origin` remote. +If you want to push to another remote, you can provide the remote name in the `remote` option. + #### --message - **optional** diff --git a/src/angular-cli-ghpages b/src/angular-cli-ghpages index 3e7f19e..76de2b7 100755 --- a/src/angular-cli-ghpages +++ b/src/angular-cli-ghpages @@ -21,9 +21,14 @@ commander ) .option( '-r, --repo ', - 'Provide the repository URL. If no value is provided, the `origin` remote of the current working directory is used.', + 'Provide the repository URL. If no value is provided, a remote of the current working directory is used (defaults to `origin`; see --remote for details).', defaults.repo ) + .option( + '-R, --remote ', + 'Provide the remote name. If no value is provided, `origin` is used. Has no function if --repo is set.', + defaults.remote + ) .option( '-m, --message ', 'The commit message, must be wrapped in quotes.', diff --git a/src/deploy/schema.json b/src/deploy/schema.json index 3729fd7..f7b5595 100644 --- a/src/deploy/schema.json +++ b/src/deploy/schema.json @@ -24,9 +24,13 @@ "default": false, "description": "Skip build process during deployment." }, + "remote": { + "type": "string", + "description": "Provide the remote name. If no value is provided, `origin` is used. Has no function if --repo is set." + }, "repo": { "type": "string", - "description": "Provide the repository URL. If no value is provided, the `origin` remote of the current working directory is used." + "description": "Provide the repository URL. If no value is provided, a remote of the current working directory is used (defaults to `origin`; see --remote for details)." }, "message": { "type": "string",