nwtgck / actions-netlify

🚀 Netlify deploy from GitHub Actions
MIT License
332 stars 41 forks source link

Add deploy numbers on Netlify #321

Open voronin-ivan opened 4 years ago

voronin-ivan commented 4 years ago

Deploys with github-action haven't deploy numbers (scope). Because of this, I cannot see the function logs from pull-requests deploys.

Look:

Screenshot 2020-10-10 at 17 17 33

First row - usual build with Netlify, without gh-action. We can see number of this deploy (#5), and link to logs looks like https://app.netlify.com/sites/your-project/functions/?scope=deploypreview:5. Second row - build with gh-actions, which hasn't number of deploy, and link to logs looks like https://app.netlify.com/sites/your-project/functions/ (without scope).

Is it possible to add a scope for deploys from gh-action? Thank you!

polarathene commented 3 years ago

Do you have the documentation for the scope query parameter? Is it specific to functions? What's the expected outcome from a url like that? The listed deploy(s) is filtered to that query?

https://app.netlify.com/sites/your-project/deploys/?scope=deploypreview:2

The above did not seem to have any effect for filtering to my single Deploy Preview #2 entry, it's possible that the link to logs you're referring to has changed since. This is now the value of the default build hash from Netlify AFAIK, eg:

https://app.netlify.com/sites/your-project/deploys/606679a57e724700078d5628

That value is available if you don't use an alias. Perhaps it resolves the original issue you were having? If not you should probably provide some more context, such as how you expect to use the information, perhaps via an action output like deploy-url provides?

Then you could construct the URL to use how you see fit. I presently use a separate action for handling the PR comment using the deploy-url output, if I wanted to provide a link to the logs, having the deploy/build/preview ID value (non-alias) would enable that.