Skip to content

Migrate site to Cloudflare Workers and GitHub Actions #492

@ppiegaze

Description

@ppiegaze

The current unionai-docs project is built and hosted on Cloudflare Pages.

We want to migrate it to be deployed instead on Cloudflare Workers but with all building done in GitHub Actions. Only the final upload of the assets and, of course, the routing of the live website should actually involve CF workers.

Here are some principles to abide by:

  • The build (in GitHub actions) should support both PR builds and production builds.
  • The PR builds should work with both PRs from unionai-docs repo and from forks of unionai-docs repo.
  • All PR submitters hould have access t to the see the PR preview build
  • The PR build link should be added in a decorator in the PR timeline in GH

Also:

  • The site supports both variants (flyte, serverless, byoc, selfmanaged) and versions (v1 and v2)
  • The versions are implemented as separate branches of the repo:
    • v1 is on branch v1
    • v2 is on branch main
  • Currently the two brnaches are built and deployed separately to two differnt internal URLS. These are then combined by DNS magic to appear as a single site.
  • We want to change this so that on each build both branches are automatically built and the result is deployed nto a siongle directory with the correct path straucture of the entire site which can then be uploaded.
  • This means that:
    • When a PR is merged to branch v1 a production build of branch v1 and branch main is kicked off and the results are combined into the deployed site
    • When a PR is merged to branch main a production build of branch main and branch v1 is kicked off and the results are combined into the deployed site.
    • When a commit is pushed to a PR branch that branches from branch v1 then a PR build of that PR branch and a build of the current HEAD of main are kicked off and the result combined in the PR build for the PR branch
    • When a commit is pushed to a PR branch that branches from branch main then a PR build of that PR branch and a build of the current HEAD of v1 are kicked off and the result combined in the PR build for the PR branch

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions