Skip to content

Conversation

@AR21SM
Copy link
Member

@AR21SM AR21SM commented Jun 28, 2025

Description of Changes

image

Related Issue

fix #80

Type of Change

Please check the appropriate box that describes your PR:

  • 🐛 Bug Fix — Fixes a documented issue or incorrect behavior
  • ✨ Content Enhancement — Updates or improves existing content
  • ✍️ New Content — Adds new chapters, examples, or significant sections
  • 🛠️ Other — Please describe in the Description of Changes section

Additional Notes (Optional)

Checklist

@AR21SM AR21SM marked this pull request as draft June 28, 2025 11:00
@AR21SM
Copy link
Member Author

AR21SM commented Jun 28, 2025

Hi @aterrel , We need to set up the following,
https://github.com/rossjrw/pr-preview-action?tab=readme-ov-file#:~:text=The%20default%20value%20works%20for%20non%2Dfork%20pull%20requests%20to%20the%20same%20repository

Quick Summary for setting this up :

  1. Go to: https://github.com/settings/tokens
  2. Click Generate new token (classic)
    image
  3. Set the following scopes: repo + workflows
    image
  4. Click Generate token and copy it
  5. Go to the repository settings
  6. Under Secrets and variables -> Actions -> Repository secrets, click New repository secret.
    image
  • Name: PREVIEW_TOKEN
  • Value: Paste the token you copied

After this, I believe this will work correctly, as this exact setup is already working in my forked repository.
image

@AR21SM AR21SM marked this pull request as ready for review June 28, 2025 11:59
@aterrel
Copy link
Member

aterrel commented Jun 28, 2025 via email

@AR21SM
Copy link
Member Author

AR21SM commented Jun 28, 2025

okay will try

Hi @aterrel, thanks for looking into it!
this unfortunately won’t work with forked pull requests currently :(
https://github.com/rossjrw/pr-preview-action#:~:text=This%20Action%20does%20not%20currently%20support%20deploying%20previews%20for%20PRs%20from%20forks%2C%20but%20will%20do%20so%20in%20the%20upcoming%20v2.

I’ll open a discussion comparing Netlify and CircleCI as alternatives, with their pros and cons, so we can decide the best path forward.

@aterrel
Copy link
Member

aterrel commented Jul 1, 2025

okay will try

Hi @aterrel, thanks for looking into it! this unfortunately won’t work with forked pull requests currently :( https://github.com/rossjrw/pr-preview-action#:~:text=This%20Action%20does%20not%20currently%20support%20deploying%20previews%20for%20PRs%20from%20forks%2C%20but%20will%20do%20so%20in%20the%20upcoming%20v2.

I’ll open a discussion comparing Netlify and CircleCI as alternatives, with their pros and cons, so we can decide the best path forward.

Yeah that's not good. I don't want to give access to folks who are putting in changes for the first time.

@aterrel
Copy link
Member

aterrel commented Jul 1, 2025

closing as discussed in #345 we will try Netlify

@aterrel aterrel closed this Jul 1, 2025
@AR21SM
Copy link
Member Author

AR21SM commented Jul 1, 2025

Hi @aterrel
Just for context, the last commit included this condition:
if: ${{ github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }}

This ensures that the action only runs for non-forked PRs, avoiding the red ❌ cross on forked ones.
image
Once v2 is officially released and the behavior is updated in the README, we can either:

  • remove this if condition entirely, or
  • create an issue to update it according to their documentation.

Alternatively, we could comment out :

pull_request: types: - opened - reopened - synchronize - closed
...so it doesn't run at all on PRs

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.

Fix preview github action runner

2 participants