{"id":20746917,"url":"https://github.com/johnagan/ci-demo","last_synced_at":"2025-04-28T11:22:52.621Z","repository":{"id":29516849,"uuid":"33055244","full_name":"johnagan/ci-demo","owner":"johnagan","description":"GitHub continuous integration (Travis) and automated deployment (Pages) demo","archived":false,"fork":false,"pushed_at":"2016-02-12T00:46:54.000Z","size":365,"stargazers_count":4,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-28T11:22:35.980Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johnagan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-29T00:06:08.000Z","updated_at":"2023-03-04T18:21:47.000Z","dependencies_parsed_at":"2022-09-04T11:00:17.888Z","dependency_job_id":null,"html_url":"https://github.com/johnagan/ci-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnagan%2Fci-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnagan%2Fci-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnagan%2Fci-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnagan%2Fci-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnagan","download_url":"https://codeload.github.com/johnagan/ci-demo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251303114,"owners_count":21567633,"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-17T08:09:52.402Z","updated_at":"2025-04-28T11:22:52.594Z","avatar_url":"https://github.com/johnagan.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Travis-CI to GitHub Pages Demo ![](https://api.travis-ci.org/johnagan/ci-demo.svg)\nThis demo was created to demonstrate a sample workflow for continuous integration and automated deployment from [Travis-CI](https://travis-ci.org) to [GitHub Pages](https://pages.github.com/).\n\n## Demo Flow\n\n##### Create a broken branch\n0. Open the [GitHub Pages](http://johnagan.github.io/ci-demo/) url\n0. Create a new branch\n0. Remove the text from one of the entries in [content.json](./src/content.json)\n0. Commit changes with a descriptive message\n0. Create a pull request with a descriptive message\n0. Wait for Travis-CI to complete (there should be an error)\n\n##### Fix the branch and merge\n0. Go back to the [content.json](./src/content.json) file and add text to the blank entry\n0. Commit changes with a descriptive message\n0. Go back to the open pull request and wait for Travis to complete (it should be green)\n0. Optional - Refresh/goto the [GitHub Pages](http://johnagan.github.io/ci-demo/) url to confirm no changes were made\n0. Merge the pull request\n0. Refresh/goto the [GitHub Pages](http://johnagan.github.io/ci-demo/) and confirm the changes are reflected\n\n## Demo Page\nAfter a successful deployment, you can view the results on [GitHub Pages](http://johnagan.github.io/ci-demo/) for this repository.\n\n## Tests\nThe [tests](./test) are written in [mocha](http://mochajs.org/) and check for blank entries in the [content.json](./src/content.json).\n\n## Automation Steps\nAll steps happen on the [Travis-CI container](http://docs.travis-ci.com/user/workers/container-based-infrastructure/) and can be monitored by going to the [Travis dashboard](https://travis-ci.org/repositories).\n\n1. Sets global variables\n2. Updates git config\n3. Builds packages with ```npm install```\n4. Clones GitHub Pages branch ```gh-pages``` into ```dist``` folder\n5. Cleans and rebuilds ```dist``` folder by running ```npm run build```\n6. Runs tests by calling ```npm test```\n7. Commits changes\n8. If request is *not* a pull request and is the **master** branch, Travis will push the ```dist``` folder to ```gh-pages``` in GitHub.\n\n## Travis Settings\nAll Travis-CI settings are stored in the [.travis.yml](./.travis.yml) file. There are four environment variables that you may want to adjust if you decide to fork this repo.\n\nVariable      | Description\n------------- | ------------\nGIT_NAME      | The display name to use when Travis commits to Git\nGIT_EMAIL     | The email address to use when Travis commits to Git\nGIT_DOMAIN    | The domain address of the GitHub or GitHub Enterprise server\nGH_TOKEN      | The [encrypted](http://docs.travis-ci.com/user/encryption-keys/) GitHub [personal access token](https://github.com/settings/applications) used to deploy\n\n## Running Locally\nThe local server runs on [Webpack Dev Server](http://webpack.github.io/docs/webpack-dev-server.html).\n\n**Setup**\n```bash\n$ npm install\n```\n\n**Tests**\n```bash\n$ npm test\n```\n\n**Build**\n```bash\n$ npm run build\n```\n\n**WebServer**\n```bash\n$ npm start\n```\n**URLs**\n* Main Site - [http://localhost:8080](http://localhost:8080)\n* Development - [http://localhost:8080/webpack-dev-server](http://localhost:8080/webpack-dev-server)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnagan%2Fci-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnagan%2Fci-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnagan%2Fci-demo/lists"}