Skip to content

Satellite Sites

Wenche Tollevsen edited this page Jan 20, 2022 · 27 revisions

How to add a new satellite

  1. Create a new dataset with the name of the satellite (country) at sanity.io

  2. Configure languages allowed by the new dataset in the file satellitesConfig.js

    • If needed, add a new language to the languages array.
      • Nice to have: add a flag icon for the new language in the file studio/icons/countries/index.ts.
    • Add a new entry to the datasets array - the first value will be set as the default language.
  3. Add the dataset name to the file satellites.json in the repository root

    • This triggers the creation of a docker image for both the web app and the sanity studio during the pipeline.
    • The array is read by the files .github/workflows/studio.yaml and .github/workflows/web.yaml and used as a matrix strategy for the job.
  4. Add the necessary radix configuration to the radixconfig.yaml file, in order to run the docker image as an app in radix.

    • Add the configuration for the web instance. Find examples in the file.
    • Add the configuration for the studio instance. Find examples in the file.
  5. Blacklist unwanted features for the satellite in the file web/common/helpers/datasetHelpers.ts

    • The way this is handled should be improved in a near future.
    • A similar approach should be implemented for the studio.
  6. Push changes to main and wait for GitHub actions to run

  7. Go to radix console and add the missing secrets to the newly created satellite web instance

    • Add SANITY_PREVIEW_SECRET
    • Add SANITY_API_TOKEN
    • Restart the app
  8. Go to manage.sanity.io and enable CORS in the API tab to the new satellite studio