Support for cross-repository page deployments

Open
#407 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
github-actions, javascript
Domain
ci-cd, devops

Research direction

Start by reviewing the behavior and repository context used by configure-pages, upload-pages-artifact, and deploy-pages, along with the related configure-pages issue #185. Trace how a workflow in repository A can build checked-out content from repository B and identify the permissions and security constraints; done means the three actions can publish for B without affecting A.

Written by the indexing model from the issue text.

Description

Currently, the set of actions configure-pages, upload-pages-artifact, deploy-pages can work only in the context of the repository that physically contains the given GitHub Workflow.

Use case

The current behavior is a limitation for us in the enterprise environment. We have several hundreds of repositories with GitHub Pages - previously their owners had to manually configure custom workflows and publication to GH Pages in each of them, which was error-prone and blocked us from automating the GH Pages setup. We created a solution that allows running GH Workflows from a central place in context of different repositories to solve this.

Unfortunately, when we tried to run GH Pages publication from such a central workflow, it turned out that the following actions: configure-pages, upload-pages-artifact, deploy-pages don't work in such setup, and always publish the artifact for the repository that contains the workflow, not the one that we want them to run on. As a workaround, we had to fallback to publishing the site from gh-pages branch, but now we need to change the repository settings to make it work (either by juggling the defaults globally, remembering which repository should use what setup, or by requiring owners to manually reconfigure the repositories).

Proposal

We would like configure-pages, upload-pages-artifact, deploy-pages to work between Git repositories:

  • workflow is in the repository A
  • workflow performs the checkout of repository B
  • workflow builds the site from repository B and uses the actions to publish it in context of that repository.

I suspect that the current behavior is the result of security considerations, but maybe additional permissions/tokens could be introduced to introduce such functionality securely?

Additional materials

https://github.com/actions/configure-pages/issues/185 - similar issue raised a couple of months ago for configure-pages.

Dominant language
JavaScript
Stars
967
Forks
147
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from actions/deploy-pages

All issues in actions/deploy-pages

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.