{"id":31443112,"url":"https://github.com/endlessm/amalgamate-pages","last_synced_at":"2025-12-11T20:04:07.706Z","repository":{"id":279237032,"uuid":"938115604","full_name":"endlessm/amalgamate-pages","owner":"endlessm","description":"Amalgamate builds from many branches into one GitHub Pages site","archived":false,"fork":false,"pushed_at":"2025-09-02T17:15:28.000Z","size":128,"stargazers_count":2,"open_issues_count":5,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-09-02T19:07:58.751Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/endlessm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-02-24T12:55:10.000Z","updated_at":"2025-09-02T17:12:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"f92d607c-e4bc-4240-b5a4-9df123a6452c","html_url":"https://github.com/endlessm/amalgamate-pages","commit_stats":null,"previous_names":["endlessm/amalgamate-pages"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/endlessm/amalgamate-pages","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endlessm%2Famalgamate-pages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endlessm%2Famalgamate-pages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endlessm%2Famalgamate-pages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endlessm%2Famalgamate-pages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/endlessm","download_url":"https://codeload.github.com/endlessm/amalgamate-pages/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endlessm%2Famalgamate-pages/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277746968,"owners_count":25870061,"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","status":"online","status_checked_at":"2025-09-30T02:00:09.208Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-09-30T19:41:47.467Z","updated_at":"2025-12-11T20:04:07.691Z","avatar_url":"https://github.com/endlessm.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Amalgamate Pages\n\nThere is no built-in way to publish a separate GitHub Pages site for each branch\nof a project. This action provides a way to simulate it, by rolling up the build\nartifacts from different branches into a single site.\n\nThe action finds the latest build artifact for all live branches in the repo,\nplus any builds for pull requests from forks, and places them beneath a\n`branches/` directory of the site, with an index in that directory.\n\nThe newest-available asset attached to a published release (which may be a\npre-release) is placed at the root of the site. If no such asset is found, the\nbuild artifact for the default branch is placed at the root of the site. If no\nsuch artifact is available, the root of the site redirects to the index of\nbranches.\n\n## Example\n\n[Threadbare](https://github.com/endlessm/threadbare) is a game by Endless Access.\nIt is used in game-making programs, where (among other things) participants can\ngain experience with contributing to a community project via Git and GitHub.\n\nYou can play the latest pre-release of the game at\n\u003chttps://play.threadbare.game/\u003e, and preview work-in-progress branches\nat \u003chttps://play.threadbare.game/branches/\u003e. This site is hosted on GitHub Pages.\n\n## Usage\n\nSuppose you currently have the following workflow:\n\n```yaml\n# .github/workflows/export.yml\nname: Export Web Build\non:\n  pull_request:\n  push:\n    branches:\n      - main\njobs:\n  build:\n    # ... some project-specific build steps ...\n\n    - name: Upload web build\n      uses: actions/upload-pages-artifact@v3\n      with:\n        name: web\n        path: build/web\n\n    - name: Deploy to GitHub Pages\n      uses: actions/deploy-pages@v4\n      with:\n        artifact_name: web\n```\n\nRemove the `actions/deploy-pages` step from your export workflow, and change the\n`actions/upload-pages-artifact` step to `actions/upload-pages-artifact`:\n\n```yaml\n# .github/workflows/export.yml\nname: Export Web Build\non:\n  pull_request:\n  push:\n    branches:\n      - main\njobs:\n  build:\n    # ... some project-specific build steps ...\n    - name: Upload web build\n      uses: actions/upload-artifact@v4\n      with:\n        name: web\n        path: build/web\n```\n\nAdd a new workflow looking like this:\n\n```yaml\n# .github/workflows/publish.yml\nname: \"Publish to GitHub Pages\"\non:\n  delete:\n  workflow_run:\n    workflows:\n      # This must match your build workflow's name\n      - \"Export Web Build\"\n    types:\n      - completed\npermissions:\n  contents: read\n  pages: write\n  id-token: write\n  # Enable commenting on PRs with a link\n  pull-requests: write\n  # Enable setting commit build status with a link\n  statuses: write\nconcurrency:\n  group: ${{ github.workflow }}\n  cancel-in-progress: true\npublish:\n    name: Publish all branches to GitHub Pages\n    runs-on: ubuntu-latest\n    steps:\n      - uses: endlessm/amalgamate-pages@v2\n        with:\n          # These must match the workflow and artifact names from your build workflow\n          workflow_name: \"Export Web Build\"\n          artifact_name: \"web\"\n```\n\nThe important elements are:\n\n1. The `workflow_run` trigger: this causes the publish workflow to run whenever\n   any of the input artifacts are updated. (The `delete` trigger causes the\n   workflow to run when a branch is deleted.)\n\n2. The `permissions` section: this workflow must be allowed to write to GitHub Pages.\n\n3. The `workflow_name` and `artifact_name` parameters to this action: these are how the\n   action finds the artifacts to amalgamate and publish. The `artifact_name` is\n   also used when scanning for release assets: for example, if `artifact_name`\n   is `web`, then the release asset is expected to have a filename ending with\n   `-web.zip`.\n\n4. The `concurrency` rule reduces duplicate runs when the workflow is triggered\n   by several events in quick succession; in particular, merging a pull request\n   and deleting the source branch will cause the workflow to be triggered once\n   by the branch deletion and again by the `main` branch being built after the\n   merge.\n\n## Limitations\n\nAny branch for which an artifact is found will be included in the amalgamated\nsite, unless there is a closed pull request for the branch. In particular this\nmeans that if you have a long-lived branch which is not regularly built, at some\npoint its build artifact will expire and will not be included in the amalgamated\nsite. Instead, the branches index will show the date on which it expired.\nManually triggering the build workflow on that branch, or pushing a new commit\nto trigger a build, will restore it.\n\nOur primary use-case for this tool is for web builds of Godot game projects. In\nprinciple, it is generic enough to work for any project, and patches are welcome\nto improve this so long as they do not undermine our primary use! One current\nassumption is that we can place arbitrary files into a `branches` directory at\nthe root of the website without interfering with the default web build.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fendlessm%2Famalgamate-pages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fendlessm%2Famalgamate-pages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fendlessm%2Famalgamate-pages/lists"}