{"id":19841287,"url":"https://github.com/codelenny/travis-gh-pages-setup","last_synced_at":"2025-02-28T19:23:38.372Z","repository":{"id":90327498,"uuid":"90084514","full_name":"CodeLenny/travis-gh-pages-setup","owner":"CodeLenny","description":"Sets up Travis CI to automatically publish to GitHub Pages","archived":false,"fork":false,"pushed_at":"2017-05-02T23:39:01.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-11T11:39:22.844Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CodeLenny.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-02T22:42:23.000Z","updated_at":"2017-05-02T23:38:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"489f5af0-468e-4a1e-abca-6dc39852f997","html_url":"https://github.com/CodeLenny/travis-gh-pages-setup","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/CodeLenny%2Ftravis-gh-pages-setup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeLenny%2Ftravis-gh-pages-setup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeLenny%2Ftravis-gh-pages-setup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeLenny%2Ftravis-gh-pages-setup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodeLenny","download_url":"https://codeload.github.com/CodeLenny/travis-gh-pages-setup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241210680,"owners_count":19927816,"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-12T12:29:55.180Z","updated_at":"2025-02-28T19:23:38.347Z","avatar_url":"https://github.com/CodeLenny.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Travis `gh-pages` Setup\n\nSets up [Travis CI][] to automatically publish to `gh-pages`.\nCurrently the process is intended for NodeJS projects only, but could be changed for other environments.\n\nAutomated Steps (steps can be opted out of):\n- **Creating an empty `gh-pages` branch**\n- **Creating an SSH key for deployment**\n  - Runs `ssh-keygen` to create the key\n  - Encrypts the file and adds to Travis CI configuration\n  - Commits the encrypted key to the Git repository (for Travis CI to decrypt)\n  - Requests the user to upload the public key as a GitHub deployment key\n  - Deletes the public and private keys for security\n- **Installs [gh-pages-travis][]** (an NPM package) to handle committing and pushing assets from Travis back to GitHub\n- **Configures Travis CI**\n  - Creates a Travis CI configuration file if needed (`.travis.yml`) setup for NodeJS\n  - Adds [gh-pages-travis][] to run, setting Git details, the directory to upload, and linking the SSH key\n  - Prevents Travis CI from running on the `gh-pages` branch\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://cloud.githubusercontent.com/assets/9272847/25643554/769a8484-2f6e-11e7-8a08-cc042af30b13.png\" /\u003e\n\u003c/p\u003e\n\n\n## Usage\n\nThe script assumes that you are running on a Unix system with:\n- git\n- [travis.rb][], Travis CI's command line tool, authenticated with your account (`travis login`)\n- The GitHub repository added as a remote repository (`git remote add ...`)\n\n**Save and commit all work** if you will be creating a new, empty `gh-pages` branch.\nAll files in the repository will be removed, including untracked files.\n\nTo download and run the script immediately, use `curl`:\n\n```bash\ncurl -o- https://raw.githubusercontent.com/CodeLenny/travis-gh-pages-setup/master/travis-gh-pages-setup.sh | bash\n```\n\nIf you want to save the script to run multiple times, you can download and save the script on your computer.\n\n```bash\ncurl https://raw.githubusercontent.com/CodeLenny/travis-gh-pages-setup/master/travis-gh-pages-setup.sh -o ~/bin/travis-gh-pages-setup.sh\n```\n\nBy default, the script will open a dialog to walk you through the setup.  Each step of the script can be disabled,\nand the different values used throughout the script can be altered on the configuration page.\nA description of each variable is available on the \"Change Value\" page.\n\nVariables can be preset by setting an environment variable when running the script.  All variables match the name given\nin the configuration page, in all capitals and with spaces replaced with underscores.\n\nFor instance, the \"Safe Clean\" and \"Deploy Branch\" configuration options can be preset via:\n\n```bash\nSAFE_CLEAN=false DEPLOY_BRANCH=\"production\" bash travis-gh-pages-setup.sh\n```\n\n[Travis CI]: https://travis-ci.org/\n[gh-pages-travis]: https://www.npmjs.com/package/gh-pages-travis\n[travis.rb]: https://github.com/travis-ci/travis.rb\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodelenny%2Ftravis-gh-pages-setup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodelenny%2Ftravis-gh-pages-setup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodelenny%2Ftravis-gh-pages-setup/lists"}