swinton / screenshot-website

:camera_flash: A GitHub Action to capture screenshots of a website, across Windows, Mac, and Linux
https://git.io/screenshot-website
ISC License
187 stars 22 forks source link

Dynamic URLs from Netlify preview #5

Closed LukaHarambasic closed 4 years ago

LukaHarambasic commented 4 years ago

Hi,

I wanted to ask if you know if it's possible to combine this action with the default Netlify setup.

Netlify hosts a preview of the current build, that's linked in every new PR. Now I want to have screenshots from this preview on multiple screen sizes. Do you know if that's possible?

Thanks, Luka :)

swinton commented 4 years ago

Hi @LukaHarambasic. Thanks for the question. I believe it should be possible. I think all you would need to know is the dynamic URL from Netlify. Is there a way to get that from the Netlify API?

swinton commented 4 years ago

Actually it looks like you can get the Netlify "deployment URL" via an output from this action:

https://github.com/marketplace/actions/netlify-actions

So you could take that output and plug it in to this action as an input.

Please let me know if you get this working. I may add it to the docs for this repo.