# CI/CD and automation

> Run the uip CLI non-interactively in a CI/CD pipeline to publish and run automations.

Once you build locally, you can run the same `uip` CLI in a pipeline to publish and run automations automatically — without the interactive browser login. This guide outlines the shape of a CI/CD setup.

## Prerequisites

- A CI/CD system such as GitHub Actions or Azure DevOps.
- UiPath credentials suitable for non-interactive authentication, stored as pipeline secrets.

## Set up a pipeline job

1. Store your UiPath credentials as secrets in your CI/CD system, never in the repository.
2. Install the CLI in the pipeline job:

   ```bash
   npm install -g @uipath/cli
   ```

3. Authenticate non-interactively using your stored secrets. Run `uip login --help` to see the options for headless authentication, since interactive browser login is not available in CI.
4. Run your publish or job command as the next pipeline step, referencing the project to publish or the job to start.
5. Check the command's exit code so the pipeline fails when the UiPath step fails.

**Result:** the pipeline authenticates and runs your UiPath commands automatically on each trigger.

:::note
The exact non-interactive authentication options and publish commands are defined by your CLI version. See the [UiPath CLI documentation](https://docs.uipath.com/uipath-cli) and `uip login --help` for the authoritative flags.
:::
