Automate deployments with CI/CD pipelines
name: Deploy MCP Server on: push: branches: [main] jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Setup Node.js uses: actions/setup-node@v3 with: node-version: '20' - name: Install ntcli run: npm install -g @nimbletools/ntcli - name: Authenticate run: ntcli auth login --non-interactive env: NTCLI_TOKEN: ${{ secrets.NTCLI_TOKEN }} - name: Deploy to staging run: | ntcli workspace switch staging ntcli server deploy my-mcp-server --version ${{ github.sha }} - name: Deploy to production if: github.ref == 'refs/heads/main' run: | ntcli workspace switch production ntcli server deploy my-mcp-server --version ${{ github.sha }}
NTCLI_TOKEN
NTCLI_API_URL
# Generate CI/CD token ntcli workspace switch production ntcli token refresh ntcli token show # Copy token to CI/CD secrets