Add GitHub Actions workflow for deploying PR previews #125

Merged
jwindhager merged 3 commits from pr-preview into main 2025-10-09 11:18:10 +00:00
jwindhager commented 2025-10-09 09:42:11 +00:00 (Migrated from github.com)

This PR adds a GHA workflow for automatically deploying PR previews using https://github.com/marketplace/actions/deploy-pr-preview

This PR adds a GHA workflow for automatically deploying PR previews using https://github.com/marketplace/actions/deploy-pr-preview
pmitev (Migrated from github.com) reviewed 2025-10-09 09:42:11 +00:00
github-actions[bot] commented 2025-10-09 09:52:20 +00:00 (Migrated from github.com)
PR Preview Action v1.6.2
Preview removed because the pull request was closed.
2025-10-09 11:18 UTC
[PR Preview Action](https://github.com/rossjrw/pr-preview-action) v1.6.2 :---: Preview removed because the pull request was closed. 2025-10-09 11:18 UTC <!-- Sticky Pull Request Commentpr-preview -->
mahesh-panchal commented 2025-10-09 10:30:33 +00:00 (Migrated from github.com)

Is this publishing the preview to the gh-pages branch? That's currently where the site is hosted from, so wouldn't that mean the public would always see the latest preview?

Is this publishing the preview to the `gh-pages` branch? That's currently where the site is hosted from, so wouldn't that mean the public would always see the latest preview?
jwindhager commented 2025-10-09 10:32:54 +00:00 (Migrated from github.com)

Yes, it is, but to the pr-preview path (see https://github.com/NBISweden/Training-Tech-shorts/pull/125#issuecomment-3385072324, for example). Still public, but not linked from the root deployment. The Training-Tech-shorts repo is public, so I personally wouldn't see an issue with that.

Yes, it is, but to the `pr-preview` path (see https://github.com/NBISweden/Training-Tech-shorts/pull/125#issuecomment-3385072324, for example). Still public, but not linked from the root deployment. The Training-Tech-shorts repo is public, so I personally wouldn't see an issue with that.
mahesh-panchal commented 2025-10-09 10:36:03 +00:00 (Migrated from github.com)

The action says it doesn't work from forks. Is there a solution for that?

The action says it doesn't work from forks. Is there a solution for that?
jwindhager commented 2025-10-09 10:38:54 +00:00 (Migrated from github.com)

Yes, I mentioned this limitation in https://github.com/NBISweden/Training-Tech-shorts/discussions/123#discussion-9003338. There is no solution as of now, as far as I can tell, but they are working on it. IMO, still an improvement to have this. If people want to use this feature, they need to work in the repo; PRs from forks still work, just without the preview feature then.

Yes, I mentioned this limitation in https://github.com/NBISweden/Training-Tech-shorts/discussions/123#discussion-9003338. There is no solution as of now, as far as I can tell, but they are [working](https://github.com/rossjrw/pr-preview-action/pull/6) on it. IMO, still an improvement to have this. If people want to use this feature, they need to work in the repo; PRs from forks still work, just without the preview feature then.
mahesh-panchal (Migrated from github.com) approved these changes 2025-10-09 11:17:59 +00:00
mahesh-panchal (Migrated from github.com) left a comment

Agreed. It's better to have some preview if possible. Since it's in a subdirectory that's better. I was under the initial impression that it the latest preview might end up being the actual site, but that's not the case.

I'll squash merge this.

Agreed. It's better to have some preview if possible. Since it's in a subdirectory that's better. I was under the initial impression that it the latest preview might end up being the actual site, but that's not the case. I'll squash merge this.
Sign in to join this conversation.
No description provided.