-
Notifications
You must be signed in to change notification settings - Fork 110
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
Surge.sh website preview workflow failing but does not raise error #259
Comments
I'll take a look on Monday. Thanks! |
I just recalled that I don't think the preview ever worked for PRs coming from forks. Because those workflows have a blank I think it's great to be able to preview content coming from forks. I don't know if there is a better state-of-the art these days, but this is the approach we take for hackweek websites to accomplish this (basically anyone with repo admin permission adds a label to grant access to the token): on:
pull_request_target:
types: [labeled, synchronize]
jobs:
add-preview:
runs-on: ubuntu-latest
# This workflow accesses secrets and checks out a PR, so only run if labelled
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
if: contains(github.event.pull_request.labels.*.name, 'preview')
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }} |
Helpful discussion here about various options:
|
I think closed by #260, see afc163/surge-preview#294 and related discussion. Sometimes the workflow still fails with only a Warning rather than an error code:
Waiting a few minutes and 're-run all jobs' seems to sort things out. |
https://github.com/xarray-contrib/xarray-tutorial/actions/runs/9135494118/job/25122893778
I'm guessing the TOKEN from last year just expired at some point. cc @lsetiawan
Might need some minor changes to the workflow (afc163/surge-preview#255)
The text was updated successfully, but these errors were encountered: