{"id":20923791,"url":"https://github.com/patternfly/patternfly-eng-publish","last_synced_at":"2025-09-29T23:32:46.168Z","repository":{"id":57320862,"uuid":"76383470","full_name":"patternfly/patternfly-eng-publish","owner":"patternfly","description":null,"archived":false,"fork":false,"pushed_at":"2017-10-28T16:49:55.000Z","size":18610,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-19T09:12:03.239Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/patternfly.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":"2016-12-13T17:42:41.000Z","updated_at":"2017-02-06T04:08:28.000Z","dependencies_parsed_at":"2022-08-26T01:10:32.305Z","dependency_job_id":null,"html_url":"https://github.com/patternfly/patternfly-eng-publish","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patternfly%2Fpatternfly-eng-publish","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patternfly%2Fpatternfly-eng-publish/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patternfly%2Fpatternfly-eng-publish/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patternfly%2Fpatternfly-eng-publish/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/patternfly","download_url":"https://codeload.github.com/patternfly/patternfly-eng-publish/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234677478,"owners_count":18870296,"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-18T20:17:45.303Z","updated_at":"2025-09-29T23:32:40.864Z","avatar_url":"https://github.com/patternfly.png","language":"JavaScript","readme":"# patternfly-eng-publish\nA set of scripts for publishing PatternFly sites.\n\n## Usage\n\n```\nUsage: bin/ghpages.js [options] \u003cfolder\u003e\nThis script will publish files to a remote branch of your repo.\n\nOptions:\n  -r, --repo       Git repo this script will publish to eg.: origin, upstream,\n                   bleathem, git@github.com:bleathem/bleathem.github.io.git\n  -t, --travis     Perform a deploy from travis, using a travis encrypted key\n                                                    [boolean] [default: \"false\"]\n  -b, --branch     Remote branch this script will publish to\n                                                           [default: \"gh-pages\"]\n  -s, --subfolder  The name of this stage, used in building the URL.  Leave\n                   empty for a root deployment                     [default: \"\"]\n  -h, --help       Show help                                           [boolean]\n\nExamples:\n  bin/ghpages.js -b gh-pages -r bleathem    Publish the public folder to the\n  -f public                                 gh-pages branch of the bleathem\n                                            repository\n\nCopyright 2017, shared under the ASLv2 license\n```\n\n## Installation\nnpm install --save-dev patternfly-eng-publish\n\nAdd a run script to your package.json with appropriate options set:\n\n```\n\"scripts\": {\n    \"publish\": \"ghpages public\"\n  },\n```\n\nUse `npm run publish` to publish the site.\n\n### Invoking from travis\nAdd another npm run script:\n\n```\n\"scripts\": {\n    \"publish-travis\": \"ghpages -t public\"\n  },\n```\n\nUpdate the .travis.yml file to invoke the script:\n\n```\nenv:\n  global:\n    - ENCRYPTION_LABEL: \"XXXXXXXXXXXX\"\n    - COMMIT_AUTHOR_EMAIL: \"patternfly-build@redhat.com\"\n    - TRIGGER_REPO_SLUG: \"patternfly/patternfly-atomic\"\n    - TRIGGER_REPO_BRANCH: \"master\"\n\n...\n\nafter_success:\n  - npm run publish-travis\n```\n\n## Adding deploy keys\n\nWe create a new key for every repo. Upload the public key to the repos via the github UI under _Settings_ -\u003e _Deploy Keys_.\n\n```ssh-keygen -t rsa -b 4096 -C \"patternfly-build@redhat.com\" -f deploy-key_patternfly-design```\n\nThe private key gets encrypted and placed in the repo itself.  `gem isntall travis` to use the travis tool to encrypt it.  Don't follow the instructions in the output of that command, but you do extract the encryption label from that message.\n\n```travis encrypt-file deploy_key```\n\nThe publish-ghpages cript is written such that it will look for the file called \"deploy_key.enc\" and use the ENCRYPTION_LABEL env var to decrypt it.  It then uses ssh-agent to load the key and use it for git pushes (over ssh).\n\nThere is no need to share the keys.  We can re-create them more easily than we can manage sharing them.\n\n# Development\n\nThis tool has a single CLI entrypoint: the `gh-pages` script.  The top-level class is the `Deployment` class.\nRefer to script/class comments for further development details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatternfly%2Fpatternfly-eng-publish","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatternfly%2Fpatternfly-eng-publish","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatternfly%2Fpatternfly-eng-publish/lists"}