{"id":13474409,"url":"https://github.com/maxheld83/ghpages","last_synced_at":"2025-10-05T04:31:45.307Z","repository":{"id":34486629,"uuid":"168396618","full_name":"maxheld83/ghpages","owner":"maxheld83","description":"Deploy arbitrary static assets through GitHub Actions","archived":true,"fork":false,"pushed_at":"2022-12-05T18:21:45.000Z","size":3772,"stargazers_count":179,"open_issues_count":23,"forks_count":31,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-19T05:43:31.888Z","etag":null,"topics":["cicd","continuous-delivery","continuous-integration","deployment","docker","github-actions","github-pages","static-site"],"latest_commit_sha":null,"homepage":"https://github.com/maxheld83/ghpages","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/maxheld83.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-30T18:51:51.000Z","updated_at":"2024-08-16T05:57:24.000Z","dependencies_parsed_at":"2022-09-16T13:30:36.916Z","dependency_job_id":null,"html_url":"https://github.com/maxheld83/ghpages","commit_stats":{"total_commits":42,"total_committers":6,"mean_commits":7.0,"dds":"0.23809523809523814","last_synced_commit":"f02dc2f7d1997f8780e8b94f227a55e4730e4f0c"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxheld83%2Fghpages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxheld83%2Fghpages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxheld83%2Fghpages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxheld83%2Fghpages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxheld83","download_url":"https://codeload.github.com/maxheld83/ghpages/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235364893,"owners_count":18978260,"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":["cicd","continuous-delivery","continuous-integration","deployment","docker","github-actions","github-pages","static-site"],"created_at":"2024-07-31T16:01:12.140Z","updated_at":"2025-10-05T04:31:45.020Z","avatar_url":"https://github.com/maxheld83.png","language":"Shell","funding_links":[],"categories":["Community Resources","Shell","Uncategorized"],"sub_categories":["GitHub Pages","Uncategorized"],"readme":"# GitHub Action to Deploy Static Assets to GitHub Pages\n\n**This action has been deprecated.\nThere's [now \"native\" support for publishing to GitHub Pages using an official GitHub action by GitHub](https://github.com/actions/deploy-pages).\nIt is much better than this approach.**\n\n\u003c!-- badges: start --\u003e\n[![Actions Status](https://github.com/maxheld83/ghpages/workflows/Deployment/badge.svg)](https://github.com/maxheld83/ghpages/actions)\n\u003c!-- badges: end --\u003e\n\nThis action simply lets you deploy arbitrary folders of static content from your workflow's working directory (`/github/workspace`) to [GitHub pages](https://pages.github.com).\nThis works by having your action instance `git push` your chosen asset folder (`BUILD_DIR`) to the `gh-pages` branch of your GitHub repository for the `gh-pages` branch to be served.\nIf you are running this action inside an [organization or user repository](https://help.github.com/articles/user-organization-and-project-pages/) (named `username/username.github.io`) it will deploy to the `master` branch instead.\n\nRemember that you may also have to adjust your [repository settings](https://help.github.com/articles/configuring-a-publishing-source-for-github-pages/).\n\nBecause this action deploys to separate, \"deploy-only\" branches, you can not use it if you want to deploy from a repo subdirectory such as `docs/`.\nIn those cases you really don't need a GitHub Action, because you would be committing the build artifacts yourself.\nFor details see the [GitHub Pages Documentation](https://help.github.com/articles/configuring-a-publishing-source-for-github-pages/).\n\nThere are already great GitHub actions to use static site generators *and* then deploy to GitHub Pages (for [jekyll](https://github.com/helaili/jekyll-action), [jekyll](https://github.com/BryanSchuetz/jekyll-deploy-gh-pages), [zola](https://github.com/shalzz/zola-deploy-action) and surely many more to come).\nThis action isn't that, though I've borrowed much of the git action from these works.\n\n**This action will not build anything, it just deploys.**\n\n## Inputs\n\nNone.\n\n\n## Outputs\n\nNone.\n\n\n## Secrets\n\nDeployment to GitHub pages happens by `git push`ing to the `gh-pages` (or `master`) branch.\nTo authorise this, the GitHub action needs a secret.\nFor now, somewhat confusingly, the `GITHUB_TOKEN` [available for every repo](https://developer.github.com/actions/creating-workflows/storing-secrets/) *does* suffice to push to `gh-pages`, but *does not* suffice to trigger a  page build on GitHub, or even propagate the content to the GitHub content-delivery network.\n\nYou therefore **have to [create a custom Personal Access Token (PAT)](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/)** much like you'd do for external services (say, Travis). This token must be created with `repo` permissions in order to deploy to Github Pages.\nYou then have to paste this token into the GitHub UI as a secret under the name `GH_PAT` (repository settings/secrets) and call it in the action as in the below.\n\nI've asked GitHub to streamline this process.\nThe discussion is documented [here](https://github.com/maxheld83/ghaction-ghpages/issues/1).\n\n\n## Environment Variables\n\nJust `BUILD_DIR`, the build directory relative to your repository root.\nYou can also pass `.` if you want to push your repository root.\n\n\n## Example Usage\n\n```yaml\nname: Deployment\n\n\"on\":\n  - push\n  - pull_request\n\njobs:\n  deploy_ghpages:\n    runs-on: ubuntu-18.04\n    steps:\n      - uses: actions/checkout@v1\n      - run: echo $GITHUB_SHA \u003e\u003e public/index.html\n      - uses: maxheld83/ghpages@v0.3.0\n        env:\n          BUILD_DIR: public/\n          GH_PAT: ${{ secrets.GH_PAT }}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxheld83%2Fghpages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxheld83%2Fghpages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxheld83%2Fghpages/lists"}