Instead of delaying the indexing of Algolia, I would recommend indexing to a temporary index, and replace your production index with the temporary one once your Gatsby website has built and deployed.
If you’re using our Laravel integration, it exposes the PHP client for you to use directly.
You can use the
moveIndex method (which counts for a single operation), and run it directly in your CI once you know that the website has built and was properly deployed. This also avoid putting your application in a weird state if the CI fails.
If you’re using incremental updates (using
partialUpdateObjects, for example) instead of reindexing everything all the time, you can first copy the production index with
copyIndex (which counts for a single operation) as your temporary index, do your partial updates here, and finally move it.