# Save changes and publish

With a commit and a push your changes land in GitLab, the pipeline brings them to the dev server, and you release production with a click.

> Source: https://www.application-platform.com/en/docs/save-and-publish/

## Commit and push

Ask the agent: "Commit my changes with a suitable message and push them." Messages start with `feat:` for something new or `fix:` for bug fixes; the platform derives the version number from that.

In the editor you use source control: type the message, click **Commit**, then sync or push.

In the terminal it is three commands in the repository folder:

```bash
git add .
git commit -m "feat: contact form on the start page"
git push
```

`ap git auto-commit` combines the three steps; each repository is committed and pushed on its own. A Git hook from the setup app blocks commits to generated files such as `.gitlab-ci.yml`; undo such changes.

## What happens after the push

A push to `main` starts the pipeline, which tests, calculates the version, builds, and rolls out to dev; you follow the progress in GitLab under **CI/CD → Pipelines** with a status and a log per job.

On dev the application is reachable at `<component>.dev.<project>.<organization-domain>`; for that you need no domain, but a server assigned to the project.

Merge requests are possible but not required; the flow with them is described in [Git workflow and deployment]({{< relref "git-workflow" >}}).

## Release production

Production does not update by itself: in GitLab under **CI/CD → Pipelines**, start the production job in the pipeline of the verified state via the play button; it publishes exactly the build from dev. If something goes wrong, start the production job of the last working pipeline again.

For mobile apps the pipeline distributes builds automatically to TestFlight and the internal test track; the manual job submits the app to the stores, see [Apps (iOS and Android)]({{< relref "publish-apps" >}}).

## What has to be set up beforehand

Backends, web apps, and homepages need a server that an administrator creates under **Servers** with **Add server** and assigns to the project; a homepage built with Hugo or Astro gets by with a web space with FTP or SFTP access, see [Servers]({{< relref "servers" >}}).

For production you need your own domain; under **Domains** the platform shows the required DNS records, and a check mark in the **Status** column confirms them. If Cloudflare is connected under **Connections**, the platform sets the records there itself, see [Domain]({{< relref "domain" >}}).

If a pipeline turns red or the page does not appear, [When something does not work]({{< relref "get-help" >}}) helps.

