Could be a ui plugin in the future
we actually thought the other way around - you use webstudio cli to fetch data and commit> then create a PR
we could allow providing a gh hook so we call the hook when published
this way we don't have to deal with git at all and any git system can run cli and pull/build
Hi Oleg. can you expand on what you mean by 'any git system can run cli and pull/build'
I meant git-based platforms like github/gitlab
they have actions/CI stuff
so one can run webstudio cli there and do stuff
or even mercurial or svn, who cares
Oh I see. I wasn't sure which cli you were referring to in your response. I will investigate.
Would the gh hook feature be something that could be available soon?
We haven't worked on a hook, maybe community could make one
@Oleg Isonen Hi Oleg I had a chance to play with the webstudio-cli and pushing to Netlify. On the first deploy, after webstudio-cli init, the up-to-date site gets published to prod on netlify. Excellent. Subsequent Edit (Publish on Webstudio) and webstudio-cli sync, netlify-cli build and netlify-cli deploy --prod did not result in the most up-to-date changes being published to production on Netlify.
Later I started thinking about writing a bash script to run in a Github Action/CI. I figured that because Docker images are ephemeral the script would have to start with webstudio-cli init so sync would not be an issue. How would I pass in variables to be used as responses to the webstudio-cli 'y' (Iwant to create a folder) and folder name 'XYZ' [I am not a nodejs ninja]. Maybe I am missing something simple and need to RTFM.
Did you try running locally? was it up-to-date locally after compiling with webstudio cli?
do you mean npx webstudio-cli build?
well you can just run npx webstudio-cli
it will do everything
the question is if the failur was on our side or with how you are using netlify cli
if locally its showing latest version then problem is with netlify
Yes if I follow the npx webstudio-cli sync
followed by npx webstudio-cli build
then npm run dev
. All Good. is that the correct dequence of commands?(sync, build run dev)
yeah, in that case the problem is with how you use netlify cli
When I create the project locally from scratch by running webstudio-cli. create folder cd to folder do netlify build and deploy all goes well with perfect site on Netlify. Subsequent edit deploy in webstudio followed by webstudio-cli followed by netlify-cli build then deploy results in a stale site on Netlify. If I delete the project locally and then re-init locally the updates arrive on Netlify.
I am OK wi this because Github Action will re-init project every time. Is there a way to pass values into webstudio-cli commands?
it doesn't seem to have anything to do with webstudio if your local site is up-to-date, you are doing something wrong with netlify cli
subsequent publishes on netlify create a preview deployment by default, did you promote it to prod?
gotta read what netlify is saying to do
can't provide support for them
should the link from webstudio be view or build when setting up the project?
Like I said all works webstudio to Netlify when project is first setup.
yes, and again its a problem with netlify cli if you say your local version of the webstudio build is up-to-date. It means you are not running something to rebuild for netlify
try creating a separate netlify project and do second deploy (without using webstudio)
the way I see it you will have the same problem