Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[infra] Integrate with external PR preview system (#19838)
Introduce a GitHub Action to monitor Pull Requests, storing relevant information in the project's git repository (thus allowing the external wptpr.live system to publish previews) and creating GitHub Deployments (thus alerting contributors to the status of the preview). This Action is triggered on a regular interval. Introduce a second GitHub Action to monitor the state of the preview system and communicate the relevant status to contributors via the Pull Request UI. This Action is triggered for every GitHub Deployment created in the previously-described Action. For example, if three Pull Requests are updated, the first GitHub Action will inspect them all. It will create GitHub Deployments only for the "trusted" Pull Requests. A new GitHub Action will run for each of the Deployments, polling the preview website until either the preview is available or a timeout is reached. This Action will update the deployment accordingly so that the author of each Pull Request author is aware of the status of the preview site. The following flow chart visually describes the same sequence: sync gh-101 (trusted) ---> | gh-102 (untrusted) -> | gh-103 (trusted) ---> | .----. |sync|--------+---------------------. '----' | | .-------------. .-------------. |deploy gh-101| |deploy gh-103| '-------------' '-------------' | | poll for preview poll for preview | | gh-101 <------ success ----- preview available poll for preview | gh-103 <------- error --------------------------------- timeout
- Loading branch information