Skip to content
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

Deploy to additional branches #534

Open
bzivyon opened this issue May 4, 2021 · 10 comments
Open

Deploy to additional branches #534

bzivyon opened this issue May 4, 2021 · 10 comments

Comments

@bzivyon
Copy link

bzivyon commented May 4, 2021

I am trying to use the action and it works great on Deploy Preview and Production.
But not in Staging branch, the issue is that although the deployment URL seems to be correct (since I use alias option), the environment code is not updated.

This is what I set up in my project settings in Netlify:

image

This is the code of the action:

- name: Deploy to Netlify
  uses: nwtgck/actions-netlify@v1
  env:
    NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
    NETLIFY_SITE_ID: ${{ env.NETLIFY_SITE_ID }}
  with:
    publish-dir: ${{ env.WORKING_DIRECTORY }}/dist
    production-branch: master
    github-token: ${{ secrets.READ_GITHUB_TOKEN }}
    github-deployment-environment: deploy preview
    enable-commit-comment: false
    deploy-message: ${{ env.SHORT_COMMIT_MESSAGE }}
    alias: ${{ env.GIT_BRANCH }}

I tried a lot of options but nothing helped and I would be very happy if you could help or advice. Thanks

@nwtgck
Copy link
Owner

nwtgck commented May 5, 2021

Do you mean you want to a deployment URL like https://mybranch1--myapp.netlify.app/ for mybranch1 branch? If so, this setting should be helpful:
https://github.com/nwtgck/piping-ui-web/blob/a84bb29daf88b4a7217105a21d98dbbcf854e598/.github/workflows/netlify.yml#L33-L51

@bzivyon
Copy link
Author

bzivyon commented May 5, 2021

Thank you for the answer!

My alias was correct, and the URL is really fine
I just changed github-deployment-environment to 'branch'

But still the same problem...
There is a difference between the deployment made via Netlify and the deployment made via this Action
And the issue is that the code of the branch environment is not updated.
It is important to note that the deployment of a new branch is working fine, the issue is only with the deployment to the staging branch

Deploy via Netlify: 😄
image (14)

Deploy via Action: 😞
image (13)

Any idea?
Thanks

@nwtgck
Copy link
Owner

nwtgck commented May 5, 2021

I may be possible. It depends on Netlify official API: https://github.com/netlify/js-client.

@bzivyon
Copy link
Author

bzivyon commented May 5, 2021

Do you mean I should contact Netlify?

Could it be a caching issue? If so do you know how to solve it?

@nwtgck
Copy link
Owner

nwtgck commented May 5, 2021

We need to investigate the API: https://github.com/netlify/js-client to find what we want ("Branch Deploy"). If none, we need to contact Netlify.

@bzivyon
Copy link
Author

bzivyon commented May 5, 2021

I would love to hear about any updates. Thanks

@nwtgck
Copy link
Owner

nwtgck commented May 5, 2021

Could you tell me how to get the images? Which screen in Netlify?

@bzivyon
Copy link
Author

bzivyon commented May 5, 2021

On the main page, select 'Sites'
image
Select a site, then click on 'Deploys'
image

@bzivyon
Copy link
Author

bzivyon commented May 13, 2021

The last few times I tried it, it worked well for me. ty

@ghost
Copy link

ghost commented Mar 3, 2022

I faced with the same issue, any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants