{"id":15022921,"url":"https://github.com/poetic/ember-cli-github-pages","last_synced_at":"2025-04-04T20:09:28.279Z","repository":{"id":24012589,"uuid":"27396843","full_name":"poetic/ember-cli-github-pages","owner":"poetic","description":"Easily manage gh-pages of your ember-cli addon","archived":false,"fork":false,"pushed_at":"2023-04-01T11:53:25.000Z","size":319,"stargazers_count":166,"open_issues_count":13,"forks_count":39,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-10-30T00:16:27.066Z","etag":null,"topics":["ember-addon","ember-cli","gh-pages","javascript"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/poetic.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-12-01T19:55:13.000Z","updated_at":"2024-04-17T21:18:40.000Z","dependencies_parsed_at":"2024-06-18T13:53:55.718Z","dependency_job_id":null,"html_url":"https://github.com/poetic/ember-cli-github-pages","commit_stats":{"total_commits":113,"total_committers":29,"mean_commits":3.896551724137931,"dds":0.7256637168141593,"last_synced_commit":"e39841356b9e21d9a4cf37f071197ddb3b1214d7"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poetic%2Fember-cli-github-pages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poetic%2Fember-cli-github-pages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poetic%2Fember-cli-github-pages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poetic%2Fember-cli-github-pages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/poetic","download_url":"https://codeload.github.com/poetic/ember-cli-github-pages/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247242678,"owners_count":20907134,"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":["ember-addon","ember-cli","gh-pages","javascript"],"created_at":"2024-09-24T19:58:32.069Z","updated_at":"2025-04-04T20:09:28.257Z","avatar_url":"https://github.com/poetic.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ember-cli-github-pages\n\n[![npm version](https://badge.fury.io/js/ember-cli-github-pages.svg)](http://badge.fury.io/js/ember-cli-github-pages)\n[![Ember Observer Score](http://emberobserver.com/badges/ember-cli-github-pages.svg)](http://emberobserver.com/addons/ember-cli-github-pages)\n[![Code Climate](https://codeclimate.com/github/poetic/ember-cli-github-pages/badges/gpa.svg)](https://codeclimate.com/github/poetic/ember-cli-github-pages)  \n[![Dependency Status](https://david-dm.org/poetic/ember-cli-github-pages.svg)](https://david-dm.org/poetic/ember-cli-github-pages)\n[![devDependency Status](https://david-dm.org/poetic/ember-cli-github-pages/dev-status.svg)](https://david-dm.org/poetic/ember-cli-github-pages#info=devDependencies)\n\nIf you need to throw up a quick example of your addon in action, this is the\naddon for you!\n\nThis addon provides new command(s) to help manage a gh-pages branch for your\naddon. It's an addon for addons.\n\n## Installation \u0026 Setup\n\nFirst you need to install ember-cli-github-pages:\n\n```sh\nember install ember-cli-github-pages\n```\n\nUpon install, this addon will modify your 'tests/dummy/config/environment.js'.\nCommit these changes with the following command:\n\n```sh\ngit add -A \u0026\u0026 git commit -m \"Added ember-cli-github-pages addon\"\n```\n\nThen you need to create the `gh-pages` branch and remove the unnecessary files:\n\n```sh\ngit checkout --orphan gh-pages \u0026\u0026 rm -rf `bash -c \"ls -a | grep -vE '\\.gitignore|\\.git|node_modules|bower_components|(^[.]{1,2}/?$)'\"` \u0026\u0026 touch .gitkeep \u0026\u0026 git add -A \u0026\u0026 git commit -m \"initial gh-pages commit\"\n```\n\n## Usage\n\nOnce that's done, you can checkout the branch you want to create the gh-page\nfrom (likely master) and run the command to build and commit it.\n\nThen run ember github-pages:commit --message \"some commit message\" in order to rebuild gh-pages branch.\n\n```sh\ngit checkout master\nember github-pages:commit --message \"Initial gh-pages release\"\n```\n\n### Ember Addons: Add a Demo URL\n\nOnce you've created a gh-pages branch, tell the world! Add a `demoURL` key to the `ember-addon` object in your `package.json`. See the `ember-cli` [documention](http://ember-cli.com/extending/#configuring-your-ember-addon-properties) for details.\n\n### A note about Org and User Pages\n\nWhile in general, github repo pages will serve the content in the `gh-pages` branch, [org and user pages](https://help.github.com/articles/user-organization-and-project-pages/#user--organization-pages) serve content in the `master` branch. When using this addon to develop a Org or User page, edit your Ember Application on an alternate branch such as `ember`. Once you are ready to build the application and send to GitHub you can either:\n\n* add the `--branch master` option to the `ember github-pages:commit` command\n* make the `gh-pages` branch on your local machine track the master branch on `origin` via the command:\n\n```sh\ngit branch --set-upstream gh-pages origin/master\n```\n\n### A complete Org/User Pages example\n\n1. Create a new Ember CLI project `ember new myBlog`. Replace `myBlog` with the name of your project.\n2. Go to the newly created project and install this addon: `cd myBlog \u0026\u0026 ember install ember-cli-github-pages`.\n3. Remove the changes made to `environment.js`, as they are not required for Org/User pages: `git checkout -- tests/dummy/config/environment.js`\n4. Commit the changes: `git add -A \u0026\u0026 git commit -m \"Added ember-cli-github-pages addon  https://github.com/poetic/ember-cli-github-pages\"`\n5. Create a new branch named `ember` which will store all the ember related code: `git checkout -b ember`\n6. Run the following command as mentioned [above](https://github.com/poetic/ember-cli-github-pages#installation--setup): ```git checkout master \u0026\u0026 rm -rf `ls -a | grep -vE '\\.gitignore|\\.git|node_modules|bower_components|(^[.]{1,2}/?$)'` \u0026\u0026 git add -A \u0026\u0026 git commit -m \"initialises gh-pages(in case of organisation master) commit\"```\n7. Switch back to ember branch: `git checkout ember`;\n8. Build the site using ember-cli-github-pages: `ember github-pages:commit --branch master --message \"adds base site\"`\n9. Create new Org/User repo on Github and add the origin: `git remote add origin https://github.com/knoxxs/knoxxs.github.io.git`. Here `knoxxs` is my username.\n10. Push the master branch: `git push -u origin master`.\n11. Open `http://knoxxs.github.io/`.\n\n### Advanced Usage\n\nYou may optionally specify an ember build environment and a branch name as parameters\n\n```sh\ngit checkout master\nember github-pages:commit --message \"Initial demo app release\" \\\n                          --branch=\"my-demo-app\" \\\n                          --environment=development\n```\n\n| Optional Argument | Default Value | Description |\n|-------------------|---------------|-------------|\n| environment       | `production`  | Ember build environment (i.e., `development`, `production`) |\n| branch            | `gh-pages`    | Branch to commit your app to |\n| destination       | `.`           | The directory into which the built application should be copied |\n| message           | `new gh-pages version` | The commit message to include with the build, must be wrapped in quotes |\n\nYou will still need to push the gh-pages branch up to github using git. Once you\ndo that you can access the repo at `http://username.github.io/repo-name`. It may\ntake a few minutes after pushing the code to show up.\n\n## FAQ\n\n### How can I create an automated deploy script?\n\nFor ease of use you can add the following to your `package.json`:\n\n```json\n  \"scripts\": {\n    \"deploy\": \"ember build --environment production \u0026\u0026 ember github-pages:commit --message \\\"Deploy gh-pages from commit $(git rev-parse HEAD)\\\" \u0026\u0026 git push origin gh-pages:gh-pages\"\n  }\n```\n\nAnd then you can execute `npm run deploy` and it will deploy with a commit message that references the commit ID you deployed from, and push that branch to github.\n\n#### Some of my assets (images) aren't showing up, what do I do?\n\nThis addon creates a production build, which fingerprints resources automatically. If you have dynamic resources in your templates, they will not be fingerprinted, so you need to ignore the fingerprinting for those resources in your ember-cli-build.js file. See the [fingerprinting docs](http://ember-cli.com/user-guide/#fingerprinting-and-cdn-urls).\n\n## Authors\n\n* [Jake Craige](http://twitter.com/jakecraige)\n\n[We are very thankful for our many contributors](https://github.com/poetic/ember-cli-github-pages/graphs/contributors)\n\n## Legal\n\n[Licensed under the MIT license](http://www.opensource.org/licenses/mit-license.php)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoetic%2Fember-cli-github-pages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpoetic%2Fember-cli-github-pages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoetic%2Fember-cli-github-pages/lists"}