{"id":16203731,"url":"https://github.com/julkue/git-branch-deploy","last_synced_at":"2025-04-07T19:27:37.866Z","repository":{"id":57123306,"uuid":"143123995","full_name":"julkue/git-branch-deploy","owner":"julkue","description":"A Node.js tool to deploy build artifacts to a GitHub branch using a Git commit.","archived":false,"fork":false,"pushed_at":"2018-08-01T12:59:50.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T03:55:45.890Z","etag":null,"topics":["deploy","deploy-tool","deployment","git","travis-ci"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/julkue.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-01T08:04:07.000Z","updated_at":"2023-08-03T15:12:04.000Z","dependencies_parsed_at":"2022-08-26T17:30:52.816Z","dependency_job_id":null,"html_url":"https://github.com/julkue/git-branch-deploy","commit_stats":null,"previous_names":["julkue/git-branch-deploy","julmot/git-branch-deploy"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julkue%2Fgit-branch-deploy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julkue%2Fgit-branch-deploy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julkue%2Fgit-branch-deploy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julkue%2Fgit-branch-deploy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/julkue","download_url":"https://codeload.github.com/julkue/git-branch-deploy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247715057,"owners_count":20983982,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deploy","deploy-tool","deployment","git","travis-ci"],"created_at":"2024-10-10T09:54:57.514Z","updated_at":"2025-04-07T19:27:37.831Z","avatar_url":"https://github.com/julkue.png","language":"JavaScript","readme":"# Git Branch Deploy\n\nA Node.js tool to deploy build artifacts to a GitHub branch using a Git commit.\n\n## Installation\n\n```bash\n$ npm i @julmot/git-branch-deploy\n```\n\n## Deployment\n\n```javascript\nconst deploy = require('@julmot/git-branch-deploy');\n\ndeploy({\n  branch: 'website', // Name of the target branch\n  sourceDir: `${__dirname}/library/`, // Folder where the build artifacts are located\n  deployDir: `${__dirname}/deploy/`, // Build folder where the GitHub repository can be cloned to\n  gitName: process.env.GIT_USER_NAME, // The name that should appear in the Git commit\n  gitEmail: process.env.GIT_USER_EMAIL, // The e-mail address to use in the Git commit\n  ghRepository: process.env.GITHUB_REPOSITORY, // The GitHub repository URL, e.g. https://github.com/julmot/git-branch-deploy\n  ghUser: process.env.GITHUB_USERNAME, // The GitHub username of the account with which the commit should be pushed\n  ghToken: process.env.GITHUB_TOKEN, // A GitHub private access key of the account with which the commit should be pushed\n  travis: true // Makes sure the deployment only succeeds when running on Travis CI\n});\n```\n\nThe above mentioned values are the default values, except:\n\n* `branch`\n* `sourceDir`\n* `deployDir`\n\nwhich must be provided (no default values). So, the minimal example would be:\n\n```javascript\ndeploy({\n  branch: 'website',\n  sourceDir: `${__dirname}/library/`,\n  deployDir: `${__dirname}/deploy/`\n});\n```\n\n__NOTE__: Make sure that the target branch in the repository exists on GitHub. To create an empty branch you can use [these instructions](https://stackoverflow.com/a/13969482/3894981).","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulkue%2Fgit-branch-deploy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjulkue%2Fgit-branch-deploy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulkue%2Fgit-branch-deploy/lists"}