# Trigger Deno build & deploy pipeline ## Automatic builds and deploys from GitHub or GitLab Integrate Zerops to your GitHub or GitLab repository and configure the automatic builds and deploys. Follow these steps: 1. Add [zerops.yaml](/deno/how-to/build-pipeline#add-zeropsyaml-to-your-repository) to your repository. 2. Connect your GitHub repository or connect your GitLab repository Then each time you create a new tag or push to a specific branch, depending on the configuration, GitHub or GitLab will initiate a new build & deploy pipeline. :::info You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yaml` in your repository. ::: ### Skip the automatic pipeline once To ensure that a pipeline is not triggered by your next push, add `[ci skip]` or `[skip ci]` to the commit message. It is case insensitive. :::note You will still see a successful delivery of a webhook in your Github/Gitlab repository as a webhook is actually triggered, but with no action. ::: ## Manual builds and deploys using Zerops CLI To start a new build & deploy pipeline manually, use the Zerops CLI. Follow these steps: 1. Add [`zerops.yaml`](/deno/how-to/build-pipeline#add-zeropsyaml-to-your-repository) to your repository. 2. [Install & setup zCLI](/references/cli) the Zerops command line tool. 3. Run `zcli push` command. The `zcli push` command uploads your application code, builds and deploys your application in Zerops. The command triggers the [build pipeline](/deno/how-to/trigger-pipeline) defined in `zerops.yaml`. `zerops.yaml` must be in the working directory. The working directory is by default the current directory and can be changed using the `--working-dir` flag. zCLI uploads all files and subdirectories of the working directory to Zerops and starts the build pipeline. If the `.gitignore` file is found, it is interpreted and the defined files and folders will be ignored. If you just want to deploy your application to Zerops, use the [zcli deploy](#manual-deploy-using-zerops-cli) command instead. #### Push command parameters ```sh Usage: zcli push [service-id-or-name] [flags] Flags: --archive-file-path string If set, zCLI creates a tar.gz archive with the application code in the required path relative to the working directory. By default, no archive is created. -g, --deploy-git-folder If set, zCLI the .git folder is also uploaded. By default, the .git folder is ignored. --disable-logs disable logs -h, --help Help for the service push command. --no-git If set, entire content of the working dir is uploaded as is. Can not be combined with --workspace-state or --deploy-git-folder flags. -P, --project-id string If you have access to more than one project, you must specify the project ID for which the command is to be executed. -S, --service-id string If you have access to more than one service, you must specify the service ID for which the command is to be executed. --setup string Choose setup to be used from zerops.yml. -v, --verbose If set, additional data will be logged to the zcli debug log file. --version-name string Adds a custom version name. Automatically filled if the ZEROPS_VERSIONNAME environment variable exists. --working-dir string Sets a custom working directory. Default working directory is the current directory. (default "./") -w, --workspace-state string Defines version of the workspace to be pushed: clean - pushes the HEAD without any local changes staged - pushes only staged files all - pushes all staged and unstaged files (default "all") --zerops-yaml-path string Sets a custom path to the zerops.yml file relative to the working directory. By default zCLI looks for zerops.yml in the working directory. ``` zCLI commands are interactive, when you press enter after `zcli push`, you will be given a list of your projects to choose from. :::info You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yaml` in your repository. ::: ## Manual deploy using Zerops CLI To start only a deploy pipeline, use the Zerops CLI. Follow these steps: 1. Add [zerops.yaml](/deno/how-to/build-pipeline#add-zeropsyaml-to-your-repository) to your repository. Omit the build section. 2. [Install & setup zCLI](/references/cli) the Zerops command line tool. 3. Run `zcli service deploy` command. The `zcli service deploy` command uploads your application and deploys it in Zerops. Use this tool if you have your own build process. If you want to build your application in Zerops, use an [automatic](#automatic-builds-and-deploys-from-github-or-gitlab) or [manual](#manual-builds-and-deploys-using-zerops-cli) build process. #### Deploy command parameters ```sh Usage: zcli service deploy pathToFileOrDir [flags] Flags: --archive-file-path string If set, zCLI creates a tar.gz archive with the application code in the required path relative to the working directory. By default, no archive is created. -g, --deploy-git-folder If set, zCLI the .git folder is also uploaded. By default, the .git folder is ignored. -h, --help Help for the service deploy command. -P, --project-id string If you have access to more than one project, you must specify the project ID for which the command is to be executed. -S, --service-id string If you have access to more than one service, you must specify the service ID for which the command is to be executed. --setup string Choose setup to be used from zerops.yml. -v, --verbose If set, additional data will be logged to the zcli debug log file. --version-name string Adds a custom version name. Automatically filled if the ZEROPS_VERSIONNAME environment variable exists. --working-dir string Sets a custom working directory. Default working directory is the current directory. (default "./") --zerops-yaml-path string Sets a custom path to the zerops.yml file relative to the working directory. By default zCLI looks for zerops.yml in the working directory. ``` `pathToFileOrDir` defines a path to one or more directories and/or files relative to the working directory. The working directory is by default the current directory and can be changed using the `--working-dir` flag. `zerops.yaml` must be placed in the working directory. :::info You can change the deploy pipeline when you need to. Just simply modify the `zerops.yaml` in your working directory. :::