{"id":20980525,"url":"https://github.com/hyperjumptech/branch-preview","last_synced_at":"2025-09-13T16:53:25.006Z","repository":{"id":54571020,"uuid":"318054731","full_name":"hyperjumptech/branch-preview","owner":"hyperjumptech","description":"Preview your latest branch changes in a subdomain.","archived":false,"fork":false,"pushed_at":"2021-02-10T02:35:28.000Z","size":14,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-26T04:14:13.786Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"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/hyperjumptech.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"code_of_conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-03T02:45:15.000Z","updated_at":"2024-04-04T09:15:42.000Z","dependencies_parsed_at":"2023-01-11T17:23:17.288Z","dependency_job_id":null,"html_url":"https://github.com/hyperjumptech/branch-preview","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperjumptech%2Fbranch-preview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperjumptech%2Fbranch-preview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperjumptech%2Fbranch-preview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperjumptech%2Fbranch-preview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hyperjumptech","download_url":"https://codeload.github.com/hyperjumptech/branch-preview/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254171560,"owners_count":22026464,"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":[],"created_at":"2024-11-19T05:29:00.924Z","updated_at":"2025-05-14T15:30:41.964Z","avatar_url":"https://github.com/hyperjumptech.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Branch preview\n\nPreview your latest changes. This GitHub Action deploys your branch to a Dokku instance and automatically assigns it a subdomain. This is an easy way to quickly push your latest changes and share your subdomain url for others to preview.\n\n## Usage\n\nAdd to your .github workflow the action below.\n\n```yml\nname: Branch Preview\n\non: push\n\njobs:\n  deploy:\n    name: Deploy\n    runs-on: ubuntu-latest\n\n    steps:\n      - name: Checkout code\n        uses: actions/checkout@v2\n\n      - name: Preview Branch\n        uses: hyperjumptech/branch-preview@v1\n        with:\n          dokku_key: ${{ secrets.DOKKU_KEY }}\n          host: ${{ secrets.HOST }}\n          port: ${{ secrets.PORT }}\n          domain: ${{ secrets.DOMAIN }}\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n          github_primary_branch: 'main'\n```\n\nYou can refer to other versions, or even the main branch like so:\n\n```yml\n  uses: hyperjumptech/branch-preview@main\n```\n\nFor convenience, it may be easier to set the input variables as secrets in GitHub. You can then change the value on the fly\n\n## Requirements\n\nYou will need a dokku instance and the ssh/private key to push your project to. You will also need a domain already pointing to your dokku. Enable virtualhost in dokku setting, so the apps can be mapped to subdomain.\n\n## Input\n\nYou need the following requirements. Please store keys and tokens in secret.\n\n| Requirement  | Description                                                                            |\n| :----------- | :------------------------------------------------------------------------------------- |\n| host         | Dokku Host address (ip) to push your branch to                                         |\n| port         | (optional) If your ssh conenction to dokku is not standard 22, set it here.            |\n| domain       | Domain to map your deployed branches to                                                |\n| dokku_key    | Private/SSH Key to your Dokku instance                                                 |\n| github_token | (automatic) Github access token already provided by github workflow, included for documentation |\n| github_primary_branch | (optional) This is your primary git branch, GitHub now defaults to main. set it here |\n\n## Output\n\nA dokku app is created from your branch name so that branch should be deployed to `branch_name.yourdomain.com` when branch_name is not the git primary branch (main/master).\n\nIn dokku's view your `branch_name` is just an app. You can check the apps in your dokku by issueing: `dokku apps:list`  \n\n## Troubleshooting\n\nThe best way to troubleshoot is to check whether you are able to push from your local to the dokku. All the rights and keys should work from local as from GitHub Actions.\n\nOn your local check if this works:\n\n`git push mydokku main:master`\n\nWhere `mydokku` is your remote dokku location that you've set using `git remote add mydokku \u003csome address\u003e`.\n\nIn the example `main` is just your local git branch as source, it is the default GitHub primary branch. If your local is also `master`, it would look `master:master` in the command above.\n\nIf everything works from local, it should transfer seamlessly in GitHub Action. If not, look for the differences.\n\nOne note on environment secrets. They do show up as *** in logs, something to note when debugging.\n\n## Contributing\n\nFind any issues? Feedback? Fork, fix and send the PRs this way!\n\n## Docs\n\n1. [changelog](./CHANGELOG.md)\n2. [code of conduct](./code_of_conduct.md)\n3. [LICENSE](./LICENSE)\n\n\n--  \nfork. clone. share.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperjumptech%2Fbranch-preview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyperjumptech%2Fbranch-preview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperjumptech%2Fbranch-preview/lists"}