Skip to main content
Connecting GitHub to your Nometria project means your app redeploys automatically every time you push to your repo. No manual deploys needed — just push your code and it goes live.

Connect GitHub

1

Run the connect command

nom github connect
This opens your browser to authorize Nometria to access your GitHub account via OAuth.
2

Authorize in the browser

Sign in to GitHub (if you are not already) and approve the authorization. The browser redirects back to your terminal automatically.
3

Verify the connection

nom github status
Example output:
  GitHub connected as octocat

Auto-deploy on push

Once GitHub is connected, every push to your default branch (usually main) triggers a new deployment automatically. The flow looks like this:
  1. You push code to GitHub
  2. Nometria detects the push via webhook
  3. Your app is rebuilt and redeployed
  4. The new version is live in about 2 minutes
Only pushes to the branch configured in your Nometria project trigger deploys. Pushes to other branches are ignored unless you configure them in the dashboard.

Push changes from the CLI

If you want to commit and push in one step, the CLI has a shortcut:
nom github push -m "Add new feature"
This stages your changes, creates a commit with the message you provide, and pushes to the connected repo. If auto-deploy is enabled, a new deployment starts immediately.
This is especially useful when an AI coding tool makes changes to your project. Instead of switching to git manually, just run one command.

List connected repos

See which repos are linked to your account:
nom github repos
Example output:
  octocat/my-app (TypeScript) [private]
  octocat/landing-page (JavaScript)

GitHub Actions workflow

For more control over the deployment process, you can use a GitHub Actions workflow instead of (or in addition to) the webhook-based auto-deploy. Run nom setup to generate the workflow file automatically:
nom setup
This creates .github/workflows/nometria-deploy.yml:
name: Deploy to Nometria

on:
  push:
    branches: [main]
  workflow_dispatch:

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - uses: actions/setup-node@v4
        with:
          node-version: '20'

      - name: Install dependencies
        run: npm ci

      - name: Deploy
        run: npx @nometria-ai/nom deploy --yes
        env:
          NOMETRIA_API_KEY: ${{ secrets.NOMETRIA_API_KEY }}

Set up the secret

1

Get your API key

Go to nometria.com/settings/api-keys and generate a key (or copy an existing one).
2

Add it to GitHub

In your GitHub repo, go to Settings > Secrets and variables > Actions and create a new secret called NOMETRIA_API_KEY with your key as the value.
3

Push the workflow

Commit and push the .github/workflows/nometria-deploy.yml file. The next push to main will trigger the workflow.

Manual deploys

The workflow includes workflow_dispatch, which means you can also trigger it manually from the Actions tab in GitHub. This is useful when you want to redeploy without pushing new code.
If you use both webhook auto-deploy and GitHub Actions, you may get duplicate deployments. Pick one approach. The GitHub Actions method gives you more control (you can add tests, linting, etc. before the deploy step).

Troubleshooting

Make sure you are signed in to your Nometria account first:
nom login
Then try nom github connect again.
Check that the connection is active:
nom github status
If it says “not connected”, run nom github connect again. Also verify you are pushing to the correct branch.
Check that the NOMETRIA_API_KEY secret is set correctly in your repo settings. You can also add NOM_DEBUG=1 to the env block to get more detailed output:
env:
  NOMETRIA_API_KEY: ${{ secrets.NOMETRIA_API_KEY }}
  NOM_DEBUG: 1