G-PST / opentools

Underlying dataset for the G-PST Open Tools Portal
https://opentools.globalpst.org/
1 stars 0 forks source link

Build opentools-form and merge into GitHub Pages artifact for deployment #11

Closed GordStephen closed 7 months ago

GordStephen commented 10 months ago

The main site is now deploying to opentools.globalpst.org, now we just need to build and deploy the contents of opentools-form as a subdirectory (e.g. /submit) of the main deployment payload (such that the form is hosted at opentools.globalpst.org/submit).

I'm thinking this process looks like the following:

  1. Create a reusable Actions workflow in opentools-form to build the opentools-form repository. Can use this as a starting point: https://github.com/actions/starter-workflows/blob/main/pages/nextjs.yml (same workflow also be created via the Actions GUI). Note we just want to upload the GitHub Pages artifact, but not deploy the artifact as-is, so we would drop the deploy job in that file. We should also adjust the artifact name that gets created (e.g. to github-pages-form) to avoid conflicts between all the different artifacts that will be getting created now
  2. Change the originally-generated portal artifact name to github-pages-portal or similar to avoid conflicts
  3. Add a new pre-deploy job (e.g. consolidate) with two dependencies: the opentools-form build workflow and the local build workflow. Before this runs, two artifacts will have been generated: github-pages-portal and github-pages-form. The new job will download/unzip/untar the two github-pages artifacts, merge the constituent files into a single file structure (with the form files in a subfolder), and upload the final artifact (the default github-pages name should be fine)
  4. Update our local deploy job to have consolidate as a direct dependency, not build. Deploy the final artifact as usual.

@KapilDuwadi, if you can handle the first item, I can take care of the rest?

GordStephen commented 7 months ago

Closing as complete