Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 462 Vote(s) - 3.43 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Netlify managing and applying changes to multiple NetlifyCMS sites

#1
Say I have 3 NetlifyCMS sites set up in GitHub and deployed/ served with Netlify. Is it possible to add a new file like index.html to all of them at once?

My first thought is to write a script that just pushes the change to each GitHub repo individually, which then gets auto-deployed by Netlify.

I'm mainly looking for any existing api, cli, etc that allows managing multiple Netlify
sites (and I guess GitHub as well since Netlify is just deploying whatever is in the repo) at once. Maybe there's a magical unified backend admin page for all sites using netlifyCMS sites.
Reply

#2
Disclaimer: I work for Netlify.

Nothing magic that I'm aware of and I'm a Hogwarts alum ;)

The typical workflow for "change one thing deploy multiple sites" is to have them all use the same repo. You can hook multiple netlify sites to the same repo, and use different build commands in each by configuring in our UI (sadly the [netlify.toml file](

[To see links please register here]

) won't work for this use case since there can be only one per repo and we read it immediately before your build command could change it). Folks who do this tend to put the files for each site in a separate directory - e.g. `site1/`, `site2/`, etc , so you could either use a build command like `cd site1 && do_your_build` OR you could ask us at [the helpdesk](

[To see links please register here]

) to set a different `base` attribute for each site so we START the build there (which would automatically run `npm install` or `yarn install` in the appropriate directory.

Another workflow that could also achieve the goal would be to set up [incoming webhooks](

[To see links please register here]

) at Netlify to rebuild each site and fire them all off on an update, and have your build command pull the updates from a separate location or repo. Commits to that "central" repo could do this automatically if you put 3 of those webhooks in place on your git provider.


Effectively, you'll have to create your own "system" to do this but there is sufficient flexibility that it can be automated without any coding, just creative build commands and repo settings :)
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through