Skip to content

chore(ci): automatically update docs after layer publish during release #1324

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

Merged
merged 11 commits into from
Feb 25, 2023
Merged

chore(ci): automatically update docs after layer publish during release #1324

merged 11 commits into from
Feb 25, 2023

Conversation

am29d
Copy link
Contributor

@am29d am29d commented Feb 22, 2023

Description of your changes

After back and forth and few clarifications with @rubenfonseca about the python setup I have reworked the workflows to their approach.

First, I have removed implicit trigger after the workflow, to have a more explicit control about the flow. We auto update the docs when we publish new layer, which is always during the release, or manual layer release trigger. Because of the second case, we add doc update step to the layer release workflow (rebuild and publish layer -> new doc update). Since we release new layer during release, we can delegate this task to layer workflow.

graph LR
    A[Make Release] --> B(Version)
    B --> C[Publish to NPM]
    C --> |Latest Version| D[Publish Layers]
    D --> E(Layer Published)
    E --> H(Update layer version in docs)
    C -->|Manual trigger| F[GitHub Release]
Loading

After some back and forth and more study of the workflow I have restructured the setup. Let's take a look at different cases.

  • update documentation by merging only doc files to main: on_doc_merge.yml
  • update documentation during the release: remove explicit doc release, because layer workflow will update the docs

I have removed the logic within the reusable workflow for docs, so it now takes input from the caller. This means that either on_doc_merge or publish_layer will know what version and alias they have to build the docs. This will also remove the failed workflows on forks and pre release doc updates.

How to verify this change

Related issues, RFCs

Issue number: #1124

PR status

Is this ready for review?: NO
Is it a breaking change?: NO

Checklist

  • My changes meet the tenets criteria
  • I have performed a self-review of my own code
  • I have commented my code where necessary, particularly in areas that should be flagged with a TODO, or hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding changes to the examples
  • My changes generate no new warnings
  • The code coverage hasn't decreased
  • I have added tests that prove my change is effective and works
  • New and existing unit tests pass locally and in Github Actions
  • Any dependent changes have been merged and published
  • The PR title follows the conventional commit semantics

Breaking change checklist

  • I have documented the migration process
  • I have added, implemented necessary warnings (if it can live side by side)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@pull-request-size pull-request-size bot added the size/L PRs between 100-499 LOC label Feb 22, 2023
@am29d am29d changed the title (chore): automatically update docs after layer publish during release chore: automatically update docs after layer publish during release Feb 24, 2023
@am29d am29d marked this pull request as ready for review February 24, 2023 14:56
@github-actions github-actions bot added the internal PRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.) label Feb 24, 2023
@am29d am29d changed the title chore: automatically update docs after layer publish during release chore(ci): automatically update docs after layer publish during release Feb 24, 2023
Copy link
Contributor

@dreamorosi dreamorosi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, thanks for the work on this and for also talking with the guys over at Python (thanks Ruben if you're reading!).

I've left a few comments here & there but very nice

Copy link
Contributor

@dreamorosi dreamorosi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing the comments, feel free to merge it when you're ready

@am29d am29d merged commit af55f01 into aws-powertools:main Feb 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal PRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.) size/L PRs between 100-499 LOC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Maintenance: publish layers & increment version during main release process
2 participants