Skip to content

Comment specific preview links for changed files #1341

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

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

bmorelli25
Copy link
Member

@bmorelli25 bmorelli25 commented May 1, 2025

Summary

This PR adds a comment with links from each changed file to the built location in the deployment preview. This comment will be updated every time a new commit is pushed.

Screenshot 2025-05-01 at 3 09 29 PM

@bmorelli25
Copy link
Member Author

Unfortunately starting with a comment and updating when the deployment completes seems to need perms beyond the general GITHUB_TOKEN. I'm going to remove this functionality for now:

Screenshot 2025-05-01 at 2 38 14 PM

@bmorelli25 bmorelli25 marked this pull request as ready for review May 1, 2025 22:13
@bmorelli25 bmorelli25 requested a review from a team as a code owner May 1, 2025 22:13
@bmorelli25 bmorelli25 changed the title Create link-to-changed-files.yml Comment specific preview links for changed files May 1, 2025
"",
...links,
"",
"🔔 *The preview site may take up to **5 minutes** to finish building. These links will become live once it completes.*"
Copy link
Member

@Mpdreamz Mpdreamz May 2, 2025

Choose a reason for hiding this comment

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

5 minutes? 😢 https://github.com/elastic/docs-content/actions/workflows/docs-build.yml begs to differ!

Its a safe margin I get it 😄

Copy link
Member

Choose a reason for hiding this comment

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

Just spotted the attempts to update on deployment created ❤️ that!

I think adding these permissions to the workflow would be sufficient.

permissions:
  deployments: read

https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#permissions

Copy link
Member Author

Choose a reason for hiding this comment

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

oh snap! Thanks, I'll give this a try

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.

2 participants