Netlify Deployment — Connect GitHub, Enable Identity, Activate Git Gateway

Deploy Dax Pro to Netlify: import your GitHub repository, configure the build, enable Identity and Git Gateway for Decap CMS, invite editors, and verify the end-to-end publishing flow.

Why Netlify for Dax Pro

Dax Pro works on any static host. It produces a folder of HTML files. Any CDN or static server can serve them. But Netlify is the recommended default for three reasons:

1. Zero-config build — Netlify reads netlify.toml in your repository and runs the build automatically. No build settings to configure, no environment variables to hunt down.

2. Identity + Git Gateway — Netlify provides both as first-party features. Decap CMS needs both to work. On Netlify, you enable them with two clicks. On other hosts, you need to configure OAuth yourself.

3. Preview deployments — every pull request gets its own preview URL. Editors can review changes on a staging site before merging.

This chapter walks through the full Netlify deployment: importing the repository, configuring the build, enabling Identity and Git Gateway, inviting editors, and verifying that Decap CMS works end-to-end.

The result is a live site at https://your-site.netlify.app with a working editorial interface at /admin/.


Prerequisites

Before starting, confirm you have:

  • ✅ A GitHub account with your Dax Pro project pushed to a repository (see the GitHub Setup chapter)
  • ✅ A Netlify account — sign up at netlify.com if you have not already
  • ✅ The personal access token you generated on GitHub (the one with repo and workflow scopes) — you will paste it into Netlify's Git Gateway settings
  • ✅ Your project's netlify.toml — Dax Pro ships with one, but confirm the build command matches your .csproj binary name
  • If any of these are missing, complete the GitHub Setup chapter first. Netlify cannot build from a repository that does not exist.


    Part 1 — Import the GitHub Repository

    Step 1: Log In to Netlify

    1. Open app.netlify.com

    2. Click Log in in the top-right corner

    3. Choose Log in with GitHub — this is the easiest path because Netlify will already have permission to list your repositories

    4. Authorize Netlify to access your GitHub account if prompted

    Alternative: log in with email and password, then connect GitHub in the next step. Both work.

    Step 2: Add a New Site

    1. From the Netlify dashboard, click Add new site (top-right)

    2. Choose Import an existing project

    3. Netlify shows a list of Git providers: GitHub, GitLab, Bitbucket, Azure DevOps

    4. Click GitHub

    Step 3: Authorize Netlify for GitHub

    If this is your first Netlify project, Netlify asks for permission to access your GitHub repositories.

    1. Click Authorize Netlify

    2. GitHub shows a permissions screen. You can grant access to all repositories or select specific repositories

    3. For a single Dax Pro site, select specific repositories is more secure. Choose the Dax Pro repository and click Install

    4. Return to Netlify

    Step 4: Choose the Repository

    1. Netlify shows a list of repositories you authorized

    2. Find your Dax Pro repository

    3. Click it

    Step 5: Configure the Build

    Netlify reads netlify.toml from the repository and pre-fills the build settings. Verify they match:

    Setting Value
    Branch to deploy main
    Build command dotnet publish -c Release -o bin && ./bin/DaxPro build
    Publish directory site

    If your binary is named differently — for example, Dax instead of DaxPro — edit the build command accordingly. The binary name matches the AssemblyName in your .csproj file. Dax Pro's default is DaxPro. The free DAX engine uses Dax.

    If the fields are empty — netlify.toml is missing or malformed. You can fill in the values manually, but the better fix is to add the file to your repository and push it.

    Step 6: Deploy

    1. Click Deploy site

    2. Netlify queues the build and shows a deployment log

    3. The build takes 1–3 minutes on the first run (the .NET SDK downloads, packages restore, and the site builds). Subsequent builds take 30–60 seconds

    4. When the build completes, Netlify shows a URL like https://amazing-name-123456.netlify.app

    Verify the deployment:

    1. Click the URL

    2. Confirm the homepage loads with your content

    3. Navigate to a few pages: /about/, /posts/, /services/, /contact/

    4. Confirm the site looks correct

    If the build fails:

    1. Click Deploys in the Netlify dashboard

    2. Click the failed deploy

    3. Read the build log — the error is usually in the last few lines

    4. Common errors:

    - "SDK not found" — the .NET SDK is not available in Netlify's build environment. Dax Pro's netlify.toml should include an environment variable for the SDK version. Check the file

    - "Project file not found" — the build command runs from the wrong directory. Confirm netlify.toml has the correct base directory (usually the repository root)

    - "Binary not found" — the build command references the wrong binary name. Match it to your .csproj

    - "YAML parse error" — a content file has invalid frontmatter. Test locally first with dotnet run -- build

    Fix the error, push the fix to GitHub, and Netlify rebuilds automatically.


    Part 2 — Change the Site Name (Optional but Recommended)

    The default URL https://amazing-name-123456.netlify.app works but is not memorable. Netlify lets you change the subdomain to anything available.

    1. In the Netlify dashboard, click Site configuration

    2. Under Site information, click Change site name

    3. Enter a name: daxpro, your-company, yourname-site

    4. Click Save

    The new URL is https://your-chosen-name.netlify.app. The old URL continues to work for a period, but new deployments use the new name.

    Note: this is the Netlify subdomain, not a custom domain. Custom domains are covered in a later chapter. For now, the Netlify subdomain is enough to test.


    Part 3 — Enable Identity

    Netlify Identity is the authentication service that Decap CMS uses to log editors in. Without it, /admin/ loads but editors cannot log in.

    Step 1: Open Identity Settings

    1. In the Netlify dashboard for your site

    2. Click Integrations in the left sidebar

    3. Click Identity

    If you do not see Identity, click Site configuration → Identity instead. The exact path varies by Netlify interface version.

    Step 2: Enable Identity

    1. Click Enable Identity

    2. Netlify enables the Identity service for your site

    3. The Identity dashboard appears, showing a list of users (empty for now) and settings tabs

    Step 3: Configure Registration

    1. In the Identity settings, find Registration preferences

    2. Click Edit settings

    3. Choose Invite only

    4. Click Save

    Why Invite only? The alternative — Open registration — lets anyone who finds /admin/ sign up. On a public site, that means strangers can create accounts and try to edit content. Invite only means only people you explicitly invite can log in.

    Do not use open registration on production sites. The convenience of "anyone can sign up" is not worth the security risk.

    Step 4: Configure Emails (Optional)

    Netlify Identity sends invitation emails and password reset emails. By default, it uses Netlify's SMTP. For most sites, this is fine.

    If you want to customize the email sender or use your own SMTP:

    1. Scroll to Emails

    2. Edit the templates or SMTP settings

    3. Save

    For a first deployment, the defaults are fine.


    Part 4 — Enable Git Gateway

    Git Gateway lets Decap CMS commit content changes to your GitHub repository on behalf of an Identity user, without requiring that user to have a GitHub account.

    This is the key component. Without it, Decap CMS cannot save anything.

    Step 1: Open Git Gateway Settings

    1. In the Identity dashboard, scroll to Services

    2. Find Git Gateway

    3. Click Enable Git Gateway

    Step 2: Configure the GitHub Access Token

    When Git Gateway is enabled, Netlify asks for a GitHub access token. This is the personal access token you generated on GitHub in the previous chapter.

    1. Paste the token (ghp_...) into the input field

    2. Click Save

    Important: the token must have the repo and workflow scopes. Without repo, Git Gateway cannot write to your repository. Without workflow, it may fail on repositories with GitHub Actions workflows (Dax Pro includes one by default).

    If you generated the token without these scopes, go back to GitHub and regenerate it with the correct scopes. Then return to Netlify and paste the new token.

    Step 3: Verify the Connection

    1. Open https://your-site.netlify.app/admin/ in a browser

    2. You should see the Decap CMS login screen

    3. Do not log in yet — there are no users to log in with. That is the next step

    If /admin/ shows a blank page or an error, Git Gateway is not configured correctly. Re-check the token.


    Part 5 — Invite Editors

    To log in to Decap CMS, an editor must first be invited via Netlify Identity. Even you, the site owner, need an invitation to become the first editor.

    Step 1: Open the Identity User List

    1. In the Netlify dashboard

    2. Click Integrations → Identity

    3. The user list appears (empty)

    Step 2: Invite Yourself

    1. Click Invite users

    2. Enter your email address

    3. Click Send

    Netlify sends an invitation email. The email contains a link to set a password.

    Step 3: Accept the Invitation

    1. Open the invitation email

    2. Click the Accept the invite button

    3. You land on a Netlify Identity page

    4. Set a password

    5. Click Sign up

    You are now a confirmed Identity user for the site.

    Step 4: Log in to Decap CMS

    1. Open https://your-site.netlify.app/admin/ in a browser

    2. Click Login with Netlify Identity

    3. Enter the email and password you just set

    4. Click Log in

    You land on the Decap CMS dashboard. The left sidebar shows all collections:

  • ⚙ Settings
  • 🧭 Navbar
  • 🦶 Footer
  • 🏠 Homepage
  • 📝 Posts
  • 🛠 Services
  • 📄 Pages
  • ✉ Contact Page
  • You can now edit any content and publish it. Changes commit to GitHub, Netlify rebuilds, and the site updates.

    Step 5: Invite Other Editors (If Needed)

    If you have a team, invite them the same way:

    1. Identity → Invite users

    2. Enter their email

    3. They receive an invitation, set a password, and can log in at /admin/

    They do not need a GitHub account. Git Gateway handles the Git commits on their behalf using your personal access token. This is the primary reason Netlify's Identity + Git Gateway is the recommended setup — it removes the GitHub account requirement for editors.


    Part 6 — Verify the End-to-End Flow

    Test the entire pipeline with a small change. This confirms that the CMS, Git Gateway, GitHub, and Netlify are all connected.

    Step 1: Edit a Setting

    1. Open https://your-site.netlify.app/admin/

    2. Log in if needed

    3. Click ⚙ Settings → Site Metadata

    4. Change the Title field — for example, add " — Test" to the end

    5. Click Publish

    6. A toast appears: "Entry saved"

    Step 2: Watch the Deployment

    1. Switch to the Netlify dashboard

    2. Click Deploys

    3. You should see a new deploy at the top, labeled with the Decap CMS commit message

    4. Click it to view the build log

    5. Wait 30–60 seconds for the build to complete

    Step 3: Confirm the Change

    1. Open https://your-site.netlify.app in a new tab (or hard-refresh with Ctrl + Shift + R)

    2. Check the browser tab title — it should now include " — Test"

    3. View source (Ctrl + U) and confirm </code> reflects the change</p> <h3>Step 4: Revert the Test</h3> <p>1. Back in <code>/admin/</code></p> <p>2. Edit the same field</p> <p>3. Remove the " — Test" suffix</p> <p>4. Click <strong>Publish</strong></p> <p>The site returns to its original title on the next build.</p> <p>If this test succeeds, the full pipeline works. You can now hand the <code>/admin/</code> URL to your editors and let them publish content.</p> <hr/> <h2>Understanding the Netlify Dashboard</h2> <p>Once deployed, these are the Netlify dashboard areas you will use most:</p> <div class="table-responsive"><table> <thead><tr> <th>Area</th> <th>Purpose</th> <p></tr></thead></p> <tbody> <tr> <td><strong>Deploys</strong></td> <td>Every build appears here. Click any deploy to see its log. Roll back to a previous deploy if needed</td> <p></tr></p> <tr> <td><strong>Site configuration</strong></td> <td>Change the site name, custom domain, environment variables, build settings</td> <p></tr></p> <tr> <td><strong>Integrations → Identity</strong></td> <td>Manage editors, enable or disable Git Gateway, view login history</td> <p></tr></p> <tr> <td><strong>Functions</strong></td> <td>Empty for Dax Pro — static sites do not use serverless functions</td> <p></tr></p> <tr> <td><strong>Forms</strong></td> <td>Empty for Dax Pro — the contact form uses Formspree, not Netlify Forms</td> <p></tr></p> <tr> <td><strong>Analytics</strong></td> <td>Optional paid feature. Not required for Dax Pro</td> <p></tr></p> <p></tbody></table></div></p> <p>You will spend most time in <strong>Deploys</strong> and <strong>Identity</strong>.</p> <hr/> <h2>Custom Domain (Quick Preview)</h2> <p>The <code>netlify.app</code> subdomain works, but for production you want your own domain — <code>example.com</code> instead of <code>example.netlify.app</code>.</p> <p>Custom domains are covered in full in a later chapter. The short version:</p> <p>1. <strong>Site configuration → Domain management</strong></p> <p>2. Click <strong>Add custom domain</strong></p> <p>3. Enter your domain (<code>example.com</code>)</p> <p>4. Netlify provides DNS records</p> <p>5. Add the records to your DNS provider (Cloudflare, Namecheap, GoDaddy, etc.)</p> <p>6. Wait for DNS propagation (5 minutes to 24 hours)</p> <p>7. Netlify provisions a free SSL certificate automatically (Let's Encrypt)</p> <p>Once the domain is configured, both the site and <code>/admin/</code> are available at the custom domain. Decap CMS works identically.</p> <hr/> <h2>Common Netlify Deployment Problems</h2> <p><strong>Problem 1: Build fails with ".NET SDK not found."</strong></p> <p>Netlify's build environment does not include .NET by default. The <code>netlify.toml</code> in Dax Pro should include:</p> <pre><code>[build.environment] <p> DOTNET_VERSION = "9.0.x"</p> <p></code></pre></p> <p>If it is missing, add it. The Netlify build environment reads this variable and installs the correct SDK version.</p> <p><strong>Problem 2: Build fails with "Binary not found."</strong></p> <p>The build command references <code>./bin/DaxPro</code> but your <code>.csproj</code> produces <code>./bin/Dax</code>. Change the build command to match. The binary name is in the <code><AssemblyName></code> element of the <code>.csproj</code> file.</p> <p><strong>Problem 3: <code>/admin/</code> shows a blank page.</strong></p> <p>The Decap CMS JavaScript fails to load. Common causes:</p> <li><strong>The <code>admin/index.html</code> file is missing</strong> — verify it exists in <code>public/admin/</code> in the repository</li> <li><strong>The Decap CDN is blocked</strong> — rare, but if the CDN fails, the editor cannot load. Check the browser console for errors</li> <li><strong>Git Gateway is not enabled</strong> — without Git Gateway, <code>/admin/</code> loads but the login and content features fail. Enable it in Netlify Identity settings</li> <p><strong>Problem 4: Login fails with "invalid credentials."</strong></p> <li><strong>You were not invited</strong> — check the Identity user list in Netlify. If your email is not there, invite yourself</li> <li><strong>You have not accepted the invitation</strong> — check your email for the invitation link. If it expired, resend from Netlify</li> <li><strong>The password is wrong</strong> — use the "Forgot password" link on the login screen</li> <p><strong>Problem 5: Publishing fails with "Failed to persist entry."</strong></p> <p>This means Decap CMS cannot commit to GitHub. Causes:</p> <li><strong>Git Gateway is disabled</strong> — enable it in Netlify Identity settings</li> <li><strong>The personal access token is expired or missing</strong> — regenerate on GitHub and re-paste in Git Gateway settings</li> <li><strong>The token lacks <code>repo</code> scope</strong> — regenerate with the correct scopes</li> <li><strong>The repository is archived or read-only</strong> — unarchive it on GitHub</li> <p><strong>Problem 6: Changes publish but the site does not update.</strong></p> <li><strong>The deploy is still running</strong> — wait 60 seconds and check the Deploys tab</li> <li><strong>The build is failing</strong> — check the deploy log for the error</li> <li><strong>Browser cache</strong> — hard-refresh (<code>Ctrl + Shift + R</code>) or open in an incognito window</li> <li><strong>CDN cache</strong> — Netlify's CDN cache is usually short-lived, but you can trigger a full rebuild by clicking <strong>Trigger deploy → Clear cache and deploy site</strong></li> <p><strong>Problem 7: Editors cannot log in even after being invited.</strong></p> <li><strong>They are using the wrong URL</strong> — the admin URL is <code>https://your-site.netlify.app/admin/</code>, not <code>/admin</code> (no trailing slash is fine, but some paths require the full URL)</li> <li><strong>Their invitation expired</strong> — invitations expire after 7 days. Resend from Netlify</li> <li><strong>They are on a different browser</strong> — Identity sessions are per-browser. If they accepted on Chrome and are trying on Safari, they must log in again</li> <p><strong>Problem 8: Git Gateway token works but editors get "403 Forbidden."</strong></p> <p>The token has insufficient scopes. Regenerate with both <code>repo</code> and <code>workflow</code>. Re-paste in Git Gateway settings.</p> <hr/> <h2>Security Checklist After Deployment</h2> <p>Before sharing the site and <code>/admin/</code> URL with editors, confirm:</p> <li class="check">⬜ <strong>Registration is set to Invite only</strong> — no one can self-register</li> <li class="check">⬜ <strong>Git Gateway token has minimal scopes</strong> — <code>repo</code> and <code>workflow</code> only</li> <li class="check">⬜ <strong>Only intended editors are in the Identity user list</strong> — remove anyone who should not have access</li> <li class="check">⬜ <strong>The site is served over HTTPS</strong> — Netlify does this automatically; verify with the browser padlock</li> <li class="check">⬜ <strong>The custom domain is configured</strong> (if applicable) — so editors use a stable URL</li> <li class="check">⬜ <strong>A backup exists</strong> — the GitHub repository is the backup; confirm it is up to date with the latest content</li> <li class="check">⬜ <strong>Site name is set</strong> — <code>your-site.netlify.app</code>, not <code>amazing-name-123456.netlify.app</code></li> <p>If any item is unchecked, fix it before inviting editors.</p> <hr/> <h2>What You Have Now</h2> <p>After completing this chapter, you have:</p> <li>✅ A Netlify site deployed from your GitHub repository</li> <li>✅ A live URL at <code>your-site.netlify.app</code></li> <li>✅ Netlify Identity enabled with Invite-only registration</li> <li>✅ Git Gateway enabled with your GitHub personal access token</li> <li>✅ A confirmed Identity user (yourself) who can log in</li> <li>✅ A working Decap CMS at <code>/admin/</code> with all collections</li> <li>✅ An end-to-end pipeline: edit in CMS → commit to GitHub → Netlify rebuilds → site updates</li> <li>✅ Understanding of how editors log in without needing GitHub accounts</li> <li>✅ A checklist of common problems and their fixes</li> <p></ul>The site is live and editable. The next chapter covers <strong>Other Deployment Options</strong> — what to do if you want to use Vercel, Cloudflare, or a VPS, and how to keep Decap CMS working outside Netlify (spoiler: you need a separate admin deployment or a subdomain strategy).</p> <p>→ Continue to <a href="/docs/other-deployments">Other Deployments</a></p> </div> </div> </article> </main> <script> (function() { const docsToggle = document.getElementById('dax-docs-toggle'); const docsSidebar = document.querySelector('.dax-docs-sidebar'); const docsOverlay = document.getElementById('dax-docs-overlay'); if (!docsToggle || !docsSidebar) return; const closeDocs = () => { docsToggle.setAttribute('aria-expanded', 'false'); docsSidebar.classList.remove('open'); if (docsOverlay) docsOverlay.classList.remove('open'); document.body.classList.remove('dax-docs-open'); }; docsToggle.addEventListener('click', () => { const isOpen = docsSidebar.classList.contains('open'); if (isOpen) { closeDocs(); } else { docsToggle.setAttribute('aria-expanded', 'true'); docsSidebar.classList.add('open'); if (docsOverlay) docsOverlay.classList.add('open'); document.body.classList.add('dax-docs-open'); } }); if (docsOverlay) docsOverlay.addEventListener('click', closeDocs); document.addEventListener('keydown', (e) => { if (e.key === 'Escape') closeDocs(); }); document.querySelectorAll('.dax-docs-nav-link').forEach(link => { link.addEventListener('click', closeDocs); }); })(); </script> <footer class="dax-footer"> <div class="dax-container"> <div class="dax-footer-top"> <div class="dax-footer-brand-col"> <a href="/" class="dax-brand"> <span class="dax-brand-symbol">.NET</span> <span class="dax-brand-name" style="color: #FFFFFF;">DAX<span class="dax-brand-accent">PRO</span></span> </a> <p class="dax-footer-desc">The ultra-luxurious corporate theme designed for high-velocity Microsoft .NET Static Site Generators and Decap CMS. Powered by pure semantic HTML5, CSS3, and modern engineering principles.</p> <div class="dax-footer-compatibility"> <span>Microsoft .NET 8 / 9</span> <span>·</span> <span>Decap CMS 3.x</span> <span>·</span> <span>Pure HTML5</span> </div> </div> <div> <h4 class="dax-footer-col-title">Architecture</h4> <ul class="dax-footer-links"> <li><a href="/services/dotnet-ssg-architecture/" class="dax-footer-link">Static Compilation</a></li> <li><a href="/services/decap-cms-workflow/" class="dax-footer-link">Decap CMS Bridge</a></li> <li><a href="/services/azure-devops-github-actions/" class="dax-footer-link">Azure CI/CD Pipeline</a></li> <li><a href="/services/performance-wcag-audits/" class="dax-footer-link">Security Audits</a></li> <li><a href="/services/legacy-cms-migration/" class="dax-footer-link">Benchmark Telemetry</a></li> </ul> </div> <div> <h4 class="dax-footer-col-title">Resources</h4> <ul class="dax-footer-links"> <li><a href="/docs/" class="dax-footer-link">Documentation</a></li> <li><a href="/posts/" class="dax-footer-link">Technical Insights</a></li> <li><a href="/tags/" class="dax-footer-link">Architecture Directory</a></li> <li><a href="https://dax.axcora.com" class="dax-footer-link">Dax Core Project</a></li> </ul> </div> <div> <h4 class="dax-footer-col-title">Company</h4> <ul class="dax-footer-links"> <li><a href="/about/" class="dax-footer-link">About Dax Pro</a></li> <li><a href="/services/" class="dax-footer-link">Enterprise Services</a></li> <li><a href="/license/" class="dax-footer-link">Commercial License</a></li> <li><a href="/contact/" class="dax-footer-link">Contact Engineering</a></li> </ul> </div> </div> <div class="dax-footer-bottom"> <div>© 2026 Dax Pro. Developed for the Microsoft .NET SSG ecosystem and Decap CMS community. All rights reserved.</div> <div class="dax-footer-bottom-links"> <a href="/privacy/" class="dax-footer-link">Privacy Policy</a> <a href="/terms/" class="dax-footer-link">Terms of Service</a> <a href="/license/" class="dax-footer-link">License</a> </div> </div> </div> </footer> <script src="/js/main.js" defer></script> </body> </html>