cloudflare / pages-action

MIT License
468 stars 95 forks source link

Nothing is here yet #81

Closed IanVS closed 1 year ago

IanVS commented 1 year ago

I'm using this action, and then shortly afterwards I snapshot the site with Percy.io. I've noticed that sometimes, the snapshots fail because it seems the deployment is not fully finished, and the pages all look like this:

image

Is there a way to cause the action to wait until the deploy is fully finished? Or do I need to use https://github.com/WalshyDev/cf-pages-await in addition to this action?

WalshyDev commented 1 year ago

You can poll it yourself in an action with something like:

- name: Poll
  run: |
    until $(curl --output /dev/null -s -I -f ${{  steps.publish.outputs.url }}); do
      printf '.'
      sleep 2
    done

(untested)

My cf-pages-wait will wait for a build not for a deployment to be ready.

johnmaguire commented 1 year ago

@WalshyDev Does this seem like a common enough use case to warrant first class support in the Action? It'd be nice to not have to duplicate the shell in each repo.