Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split up the workflow action for better maintainability #6397

Open
Garanas opened this issue Aug 7, 2024 · 0 comments
Open

Split up the workflow action for better maintainability #6397

Garanas opened this issue Aug 7, 2024 · 0 comments
Assignees
Labels
area: changelog management related to (automated) management of changelogs

Comments

@Garanas
Copy link
Member

Garanas commented Aug 7, 2024

Description

At the moment we're introducing pre-processing steps to the build and deploy workflow. In the future we'll be introducing various other pre-processing and possibly even post-processing steps. This can quickly turn into a mess: one workflow file that will have more and more responsibilities.

To get in front of this it is best to split off the build and deploy workflow file into two workflow files:

  • (1) A workflow file that retrieves the repository and applies the pre-processing. It returns the docs folder as an artifact.
  • (2) A workflow file that takes the docs artifact and then proceeds to build and deploy it.

The advantage of this approach is that we can review what it is that we end up building by downloading the artifact manually. This should make it easier to review the pre-processing without building and deploying the entire webapp.

Course of Action

Review the current build and deploy workflow. Split off the following parts of it into a separate, new workflow called docs-prepare-build.yml:

  • (1) Checkout of the repository
  • (2) Creation of changelogs for fafdevelop and fafbeta
  • (3) Appending of changelogs to whatever is in the docs folder
  • (4) pre-processing all the changelogs to update github references

Then, we want to create a new artifact of the whatever the content is of the docs folder. We call the artifact docs.

In the current build and deploy workflow we want to add an extra step calling the docs-prepare-build.yml workflow. Then, instead of checking out the repository we retrieve the docs artifact. After that we proceed with building and deploying whatever is in the docs artifact.

tip: don't forget to add the workflow that we need to wait on to the needs key-value pair!

Test Plan

Once the skeleton is in-place you should be able to run the workflow from your branch and inspect the artifact of the pre-processed docs folder.

Learning Goals

Long-term maintainability should always be part of the development process. With these changes we not only reduce the responsibilities of the build and deploy, we also introduce the capability to inspect what we end up building, before building (and deploying) it.

Progress

Not applicable

@Garanas Garanas added the area: changelog management related to (automated) management of changelogs label Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: changelog management related to (automated) management of changelogs
Projects
None yet
Development

No branches or pull requests

2 participants