Back to Blog
DevOps

Automating Odoo Deployments with GitHub Actions

December 28, 20256 min read

Continuous deployment can significantly improve your Odoo development workflow. This guide shows you how to automate deployments using GitHub Actions and Nurosentrix webhooks.

Overview

With CI/CD, you can:

  • Automatically deploy when code is pushed
  • Run tests before deployment
  • Roll back failed deployments
  • Track deployment history
  • Prerequisites

  • GitHub repository with your Odoo modules
  • Nurosentrix instance with CI/CD enabled
  • API key for automation
  • Setting Up the Webhook

    First, configure the webhook in Nurosentrix:

    1. Go to Instance → CI/CD

    2. Click "Add Webhook"

    3. Copy the webhook URL and secret

    GitHub Actions Workflow

    Create `.github/workflows/deploy.yml`:

    name: Deploy to Nurosentrix

    on:

    push:

    branches: [main]

    jobs:

    deploy:

    runs-on: ubuntu-latest

    steps:

    - uses: actions/checkout@v4

    - name: Trigger Deployment

    run: |

    curl -X POST ${{ secrets.NUROSENTRIX_WEBHOOK }} \

    -H "X-Webhook-Secret: ${{ secrets.WEBHOOK_SECRET }}" \

    -H "Content-Type: application/json" \

    -d '{"ref": "${{ github.ref }}", "commit": "${{ github.sha }}"}'

    Adding Tests

    Run Odoo tests before deployment:

  • name: Run Tests
  • run: |

    docker run --rm \

    -v $PWD:/mnt/extra-addons \

    odoo:17.0 \

    odoo --test-enable -d test_db --stop-after-init

    Deployment Strategies

    Rolling Deployment

    Updates instances one at a time to maintain availability.

    Blue-Green Deployment

    Deploys to a staging environment first, then switches traffic.

    Conclusion

    CI/CD automation reduces deployment errors and speeds up your development cycle. Start with simple workflows and expand as needed.