> ## Documentation Index
> Fetch the complete documentation index at: https://docs.enkryptify.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Netlify

<AccordionGroup>
  <Accordion title="Prerequisites" icon="list-check">
    * An Enkryptify workspace with admin access
    * A Netlify account with access to the target site
  </Accordion>

  <Accordion title="Permissions" icon="scroll-text">
    When connecting Enkryptify to Netlify via OAuth, Netlify grants access to your account through a single scope. Netlify does not offer more granular OAuth scopes at this time.

    Enkryptify uses the OAuth token for three things:

    * Reading your account to confirm the connection succeeded
    * Listing your sites so you can pick a sync target
    * Reading and writing environment variables on the site you selected

    > The token is encrypted at rest and is never exposed to your browser. Enkryptify does not read your site content, builds or deploys.
  </Accordion>
</AccordionGroup>

## Steps to complete

<Steps>
  <Step title="Create a new sync">
    * Go to the `Syncs` tab of your project and click on `Netlify`.
  </Step>

  <Step title="Authorize with Netlify">
    * You'll be redirected to Netlify to authorize the Enkryptify application.
    * Grant access to the account that owns your target site.
  </Step>

  <Step title="Select your Netlify site">
    * All sites across your Netlify teams will be listed.
    * Select the target site for syncing environment variables.
  </Step>

  <Step title="Choose a deploy context and map environments">
    * **Deploy context**: choose which Netlify deploy context receives the synced values:
      * **All contexts**: the same value is used everywhere.
      * **Production**: builds from your production branch.
      * **Deploy Previews**: builds from pull and merge requests.
      * **Branch deploys**: builds from branches other than your production branch.
      * **Local development**: values used by the Netlify CLI and dev server.
    * **Enkryptify environment**: select which Enkryptify environment to sync secrets from.
    * Example: Enkryptify `production` environment synced to the Netlify `Production` context.
  </Step>
</Steps>

<Note>
  Netlify applies environment variable changes on the next build or deploy. Trigger a new deploy in Netlify after syncing to make the values available to your site.
</Note>
