CodeLynq does not replace your deployment pipeline - it starts the one you already have. You tell it where and how a project is deployed (a deploy target), and it can then start a deployment on request or automatically after a merge. Every deployment is recorded as a release, so you can see what was deployed where.
Setting up deploy targets and deploying are for organization admins and the project's owner. Everyone in the organization can see the releases.
Add a deploy target
- Open the project, go to Settings and choose Deployments (under Operations).
- Under Deploy targets, click Add target.
- Fill in:
- Environment: a name such as
productionorstaging. - Method: how CodeLynq starts the deployment (see below).
- Repository: Any repository, or the one repository this target deploys.
- Deploy automatically when a CodeLynq PR is merged: tick this for automatic deployments.
- Environment: a name such as
- Click Add target.
Each target is shown as a card, with badges such as Auto-deploy and Secret set, and Edit and Delete buttons.
Method: GitHub Actions workflow
CodeLynq starts a workflow in your GitHub repository.
- Workflow file: the file name of the workflow in
.github/workflows, for exampledeploy.yml. - Ref (optional): the branch or tag to run the workflow on. Without it, the repository's default branch is used.
The workflow must be startable manually, so it needs a workflow_dispatch trigger. CodeLynq passes the commit to deploy as the input commit_sha (empty means the latest commit), so add that input to the trigger:
on:
workflow_dispatch:
inputs:
commit_sha:
required: false
Method: Deploy webhook
CodeLynq sends a POST request with a JSON body to a URL of your own deployment tool.
- Webhook URL: the address to call.
- Secret (optional): lets your tool check that a request comes from CodeLynq. It is never shown again after saving. Each request then carries:
X-CodeLynq-Signature: sha256=: an HMAC-SHA256, keyed with the secret, over the value ofX-CodeLynq-Timestamp, a dot, and the raw request body. Recompute it and compare; reject requests whose timestamp is more than a few minutes old.Authorization: Bearer, for tools that can only compare a token.
The body contains the project, the environment, the commit to deploy and the ref.
Deploy now
- Under Releases, click Deploy now (available once a target exists).
- Choose the Target.
- Optionally enter a Commit SHA (blank means the latest commit) and a Ref.
- Click Deploy.
Deploy automatically after a merge
With Deploy automatically when a CodeLynq PR is merged ticked, a target deploys every time a pull request opened by CodeLynq is merged. Pull requests from anyone else never trigger it.
- A target set to one repository only deploys merges in that repository.
- On a merge into a branch other than the default branch - a version or release branch - only targets whose Ref is that branch, or that have no ref, deploy. See Work on several branches at once.
- CodeLynq learns about merges through the repository's CI webhook (GitHub, GitLab or Bitbucket). Set it up on the repository with the events listed there - see Repositories.
Follow releases
The Releases list on the project shows each deployment with its environment, status (Pending, Running, Success, Failed or Unknown), commit and date, with a View link. The Deployments page in the sidebar shows the releases of all projects, each with a Log link.
For the GitHub Actions method, the status follows your workflow: when the workflow run finishes, the release turns to success or failed. This also comes in through the repository's CI webhook.
A failed deployment shows up in the Inbox as Deploy failed.
Related
- Hosting: let CodeLynq run the application for you. A hosted environment gets its own deploy target.
- External AI assistants can also list releases and start a deployment.