[![Codacy Badge](https://app.codacy.com/project/badge/Grade/867aeabe457f4367b9e0013b713add6b)](https://www.codacy.com/gh/tj-python/github-deploy/dashboard?utm_source=github.com&utm_medium=referral&utm_content=tj-python/github-deploy&utm_campaign=Badge_Grade)
[![PyPI version](https://badge.fury.io/py/github-deploy.svg)](https://badge.fury.io/py/github-deploy)
[![Upload Python Package](https://github.com/tj-python/github-deploy/actions/workflows/deploy.yml/badge.svg)](https://github.com/tj-python/github-deploy/actions/workflows/deploy.yml) [![Downloads](https://pepy.tech/badge/github-deploy)](https://pepy.tech/project/github-deploy)
# github-deploy
## Using [polyrepo's](https://github.com/joelparkerhenderson/monorepo_vs_polyrepo#what-is-polyrepo) to manage projects ?
This can introduce a number challenges one of which is maintaining consistency across multiple repositories, for files like shared configurations without introducing git submodules or mono repositories which requires a more complex deployment configuration.
> For example adding a github action or maintaing a consistent pull request template accross your organization.
## Solution
`github-deploy` makes maintaining such configurations as easy as a single command.
**Alias** : `gh-deploy`
## Installation
```shell script
pip install github-deploy
```
## Setup
A Personal Access Token which can be created using this [guide](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)
### Required Scopes
The required scopes are `repo` and `workflow`
<img width="852" alt="Screen Shot 2022-06-11 at 8 16 01 AM" src="https://user-images.githubusercontent.com/17484350/173187599-483bf220-6263-4a81-917f-d0e0dcef3ed9.png">
## Usage
### Upload files to github
```shell script
gh-deploy upload --org [org] --token [PAT_TOKEN] --dest [LOCATION TO UPLOAD FILE] --source [SOURCE FILE LOCATION]
```
Example:
```shell script
gh-deploy upload --org tj-actions --token [PAT_TOKEN] --dest '.github/workflows/auto-approve.yml' --source auto-approve.yml
```
> NOTE: `auto-approve.yml` is located on your local system.
### Deleting files on github
```shell script
gh-deploy delete --org [org] --token [PAT_TOKEN] --dest [LOCATION TO DELETE]
```
Example:
```shell script
gh-deploy delete --org tj-actions --token [PAT_TOKEN] --dest '.github/auto-approve.yml'
```
## COMMAND
`gh-deploy --help`
```
Usage: gh-deploy [OPTIONS] COMMAND [ARGS]...
Deploy changes to multiple github repositories using a single command.
Options:
--help Show this message and exit.
Commands:
delete Delete a file in all repositories owned by an organization/user.
upload Upload a file to all repositories owned by an organization/user.
```
`gh-deploy upload --help`
```
Usage: gh-deploy upload [OPTIONS]
Upload a file to all repositories owned by an organization/user.
Options:
--org TEXT The github organization.
--token TEXT Personal Access token with read and write
access to org.
--source PATH Source file.
--dest TEXT Destination path.
--overwrite / --no-overwrite Overwrite existing files.
--private / --no-private Upload files to private repositories.
--help Show this message and exit.
```
`gh-deploy delete --help`
```
Usage: gh-deploy delete [OPTIONS]
Delete a file in all repositories owned by an organization/user.
Options:
--org TEXT The github organization.
--token TEXT Personal Access token with read and write access to org.
--dest TEXT Destination path to delete.
--help Show this message and exit.
```
### Resources
- http://www.gigamonkeys.com/mono-vs-multi/
Raw data
{
"_id": null,
"home_page": "https://github.com/tj-python/github-deploy",
"name": "github-deploy",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "yaml,deploy,poly repository,github,single configuration",
"author": "Tonye Jack",
"author_email": "jtonye@ymail.com",
"download_url": "https://files.pythonhosted.org/packages/58/39/01befc6bb599fc4c5229931501d3311f2fe3c6eeab4bc16c145f186518fe/github-deploy-1.2.0.tar.gz",
"platform": null,
"description": "[![Codacy Badge](https://app.codacy.com/project/badge/Grade/867aeabe457f4367b9e0013b713add6b)](https://www.codacy.com/gh/tj-python/github-deploy/dashboard?utm_source=github.com&utm_medium=referral&utm_content=tj-python/github-deploy&utm_campaign=Badge_Grade)\n[![PyPI version](https://badge.fury.io/py/github-deploy.svg)](https://badge.fury.io/py/github-deploy)\n[![Upload Python Package](https://github.com/tj-python/github-deploy/actions/workflows/deploy.yml/badge.svg)](https://github.com/tj-python/github-deploy/actions/workflows/deploy.yml) [![Downloads](https://pepy.tech/badge/github-deploy)](https://pepy.tech/project/github-deploy)\n\n# github-deploy\n\n## Using [polyrepo's](https://github.com/joelparkerhenderson/monorepo_vs_polyrepo#what-is-polyrepo) to manage projects ?\n\nThis can introduce a number challenges one of which is maintaining consistency across multiple repositories, for files like shared configurations without introducing git submodules or mono repositories which requires a more complex deployment configuration.\n\n\n> For example adding a github action or maintaing a consistent pull request template accross your organization.\n\n## Solution\n\n`github-deploy` makes maintaining such configurations as easy as a single command.\n\n**Alias** : `gh-deploy`\n\n\n## Installation\n\n```shell script\npip install github-deploy\n```\n\n## Setup \nA Personal Access Token which can be created using this [guide](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)\n\n### Required Scopes\nThe required scopes are `repo` and `workflow`\n<img width=\"852\" alt=\"Screen Shot 2022-06-11 at 8 16 01 AM\" src=\"https://user-images.githubusercontent.com/17484350/173187599-483bf220-6263-4a81-917f-d0e0dcef3ed9.png\">\n\n\n## Usage\n\n### Upload files to github\n\n\n```shell script\ngh-deploy upload --org [org] --token [PAT_TOKEN] --dest [LOCATION TO UPLOAD FILE] --source [SOURCE FILE LOCATION]\n```\n\nExample:\n\n```shell script\ngh-deploy upload --org tj-actions --token [PAT_TOKEN] --dest '.github/workflows/auto-approve.yml' --source auto-approve.yml\n```\n\n> NOTE: `auto-approve.yml` is located on your local system.\n\n\n### Deleting files on github\n\n\n```shell script\ngh-deploy delete --org [org] --token [PAT_TOKEN] --dest [LOCATION TO DELETE]\n```\n\nExample:\n\n```shell script\ngh-deploy delete --org tj-actions --token [PAT_TOKEN] --dest '.github/auto-approve.yml'\n```\n\n\n\n## COMMAND\n`gh-deploy --help`\n\n```\nUsage: gh-deploy [OPTIONS] COMMAND [ARGS]...\n\n Deploy changes to multiple github repositories using a single command.\n\nOptions:\n --help Show this message and exit.\n\nCommands:\n delete Delete a file in all repositories owned by an organization/user.\n upload Upload a file to all repositories owned by an organization/user.\n\n```\n\n`gh-deploy upload --help`\n\n```\nUsage: gh-deploy upload [OPTIONS]\n\n Upload a file to all repositories owned by an organization/user.\n\nOptions:\n --org TEXT The github organization.\n --token TEXT Personal Access token with read and write\n access to org.\n\n --source PATH Source file.\n --dest TEXT Destination path.\n --overwrite / --no-overwrite Overwrite existing files.\n --private / --no-private Upload files to private repositories.\n --help Show this message and exit.\n```\n\n`gh-deploy delete --help`\n\n```\nUsage: gh-deploy delete [OPTIONS]\n\n Delete a file in all repositories owned by an organization/user.\n\nOptions:\n --org TEXT The github organization.\n --token TEXT Personal Access token with read and write access to org.\n --dest TEXT Destination path to delete.\n --help Show this message and exit.\n```\n\n### Resources\n- http://www.gigamonkeys.com/mono-vs-multi/\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Deploy yaml files to a large number of repositories in seconds.",
"version": "1.2.0",
"project_urls": {
"Homepage": "https://github.com/tj-python/github-deploy"
},
"split_keywords": [
"yaml",
"deploy",
"poly repository",
"github",
"single configuration"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "82ad352aeec32c497840b3478e5c7a13e2e1f88178537e6da5768cb0fcdf5c48",
"md5": "60f102e02bdad76260aa1519dc36efe2",
"sha256": "f72a9f9957c80ed93c8070e082808d6c634c09837d1132b7265517006bab2d36"
},
"downloads": -1,
"filename": "github_deploy-1.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "60f102e02bdad76260aa1519dc36efe2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 22145,
"upload_time": "2023-07-05T18:14:25",
"upload_time_iso_8601": "2023-07-05T18:14:25.847702Z",
"url": "https://files.pythonhosted.org/packages/82/ad/352aeec32c497840b3478e5c7a13e2e1f88178537e6da5768cb0fcdf5c48/github_deploy-1.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "583901befc6bb599fc4c5229931501d3311f2fe3c6eeab4bc16c145f186518fe",
"md5": "3ac4cda5978f6b2a1041f121c4598438",
"sha256": "b7d049ef3955252a12a585d5edbdb108994941cd34c3a3cf440e9484861bc05f"
},
"downloads": -1,
"filename": "github-deploy-1.2.0.tar.gz",
"has_sig": false,
"md5_digest": "3ac4cda5978f6b2a1041f121c4598438",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 18971,
"upload_time": "2023-07-05T18:14:27",
"upload_time_iso_8601": "2023-07-05T18:14:27.545418Z",
"url": "https://files.pythonhosted.org/packages/58/39/01befc6bb599fc4c5229931501d3311f2fe3c6eeab4bc16c145f186518fe/github-deploy-1.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-05 18:14:27",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "tj-python",
"github_project": "github-deploy",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "github-deploy"
}