Open NullVoxPopuli opened 5 years ago
Hi @NullVoxPopuli
I think you should be able to do so with the netlify cli action: https://github.com/netlify/actions/tree/master/cli
Adding that as a step after the test linting ones run in GH Actions, and you could deploy without the --prod
flag to create a draft deploy.
More details in the cli docs:
Let me know if that helps!
Can those be tied to pull requests? I'd like the deploy preview / branch deploy to be visitable from the PR checks links
Also, would they auto clean up after some period of staleness?
Can those be tied to pull requests? I'd like the deploy preview / branch deploy to be visitable from the PR checks links
Unfortunately, you can't tie those to a PR/branch if it wasn't deployed from a GitHub webhook. You could probably add some extra logic in a script to get the output of the deploy command and create a status check from GH Actions.
Also, would they auto clean up after some period of staleness?
No.
@NullVoxPopuli I think I did what you mentioned in your comment. You can check my workflow here:
https://github.com/calitb/VueJS-Sample/blob/master/.github/workflows/deploy_staging.yml
@NullVoxPopuli I think I did what you mentioned in your comment. You can check my workflow here:
https://github.com/calitb/VueJS-Sample/blob/master/.github/workflows/deploy_staging.yml
@calitb Thank you for this. This was failing when a PR is from a forked repo. Do you know why?
sorry, no idea
@NullVoxPopuli I think I did what you mentioned in your comment. You can check my workflow here: https://github.com/calitb/VueJS-Sample/blob/master/.github/workflows/deploy_staging.yml
@calitb Thank you for this. This was failing when a PR is from a forked repo. Do you know why?
This is likely because of permission issues when PRs are triggered from a forked repo(i.e the workflow has no access to the secrets), hence failing to complete. See the details here
I'd love to be able to:
I think if lots of people adopted this strategy of deployment, it would save netlify a bunch of money in build-server time ;)