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

WIP: Add a preview-build action for PRs #227

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mjahoda
Copy link
Contributor

@mjahoda mjahoda commented Feb 9, 2024

An attempt to add an automatically triggered action that provides a preview build for every new or re-opened pull request.

@mjahoda mjahoda requested a review from a team as a code owner February 9, 2024 10:11
Copy link
Contributor

@rolfedh rolfedh left a comment

Choose a reason for hiding this comment

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

Hi Mirek,

I've reviewed the .github/workflows/preview-build.yml workflow, and it's looking great! It's well-structured and aligns perfectly with our goals for automating documentation previews. I have a few friendly suggestions that could further enhance its effectiveness:

  • Comments for Clarity: Adding brief comments to complex steps or choices (like the Docker usage) could make the workflow more accessible to others, especially new contributors or those not familiar with specific tools.
  • Error Handling: Consider incorporating steps for error handling, such as notifications for build failures. This could improve our response time for resolving any issues.
  • Caching Dependencies: If the build process involves stable dependencies, implementing caching could significantly reduce build times and resource usage.
  • Security Checks: Ensuring the Docker images and actions are from trusted and verified sources is crucial for maintaining the security of our workflow.
  • Workflow Documentation: A short README explaining the purpose and workings of this workflow (and any others in .github/workflows) would be beneficial for maintainability and onboarding.

These are just enhancements to what is already a solid foundation. I'm looking forward to seeing this project evolve how it will improve our documentation process. Great work!

Best, Rolfe

Copy link
Collaborator

@IanFrangs IanFrangs left a comment

Choose a reason for hiding this comment

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

LGTM!

@mjahoda
Copy link
Contributor Author

mjahoda commented Mar 13, 2024

@rolfedh @IanFrangs @emmurphy1 Thank you for checking the PR, but it is far from to be finished. I tried to indicate this by WIP: in the title. Because it's based on the YAML file [1] we use for publishing our main deliverable, we can use Rolfe's suggestions also there.

I'm still struggling to realize what URL can I use for deploying preview builds. In the Github docs for deploying PR preview I've checked, I only found url: ${{ steps.deployment.outputs.page_url }} we already use for the latest published mod-docs guide.

After the upcoming RHEL Beta releases are out, I'll try to follow guidance on [2]. And probably on some copy of this repository first.

[1] https://github.com/redhat-documentation/modular-docs/blob/main/.github/workflows/deploy-site.yml

[2] https://medium.com/@vegaobed/how-to-enable-pull-request-previews-in-github-pages-dc3a94fa969b

@mjahoda mjahoda marked this pull request as draft March 13, 2024 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants