Prerequisites
1
Get an API key
In the Alpic dashboard, open your team and go to API Keys in the sidebar. Click New
API key, name it, and copy the key.
2
Find your project and environment IDs
- Project ID : In your project, copy the project ID from Settings → General, - Environment ID : from the environment’s card, in the Environments tab.
3
Add them as CI/CD variables
In your GitLab project, go to Settings → CI/CD → Variables and add
ALPIC_API_KEY (masked),
ALPIC_PROJECT_ID, and ALPIC_ENVIRONMENT_ID.Configure the pipeline
Add a deploy job to your.gitlab-ci.yml:
.gitlab-ci.yml
main now deploys to your Alpic environment.
Deploy to multiple environments
To target several environments (for example staging and production), extend a shared job and set the IDs per environment. Here production is a manual action:.gitlab-ci.yml
Use
--project-id and --environment-id rather than --project-name in CI: names can be changed, IDs are stable.
See the alpic deploy reference right here.