Deploying
Git and deploy on push
Build from GitHub, GitLab, Bitbucket or Codeberg. Public repositories need nothing; private ones need one of three kinds of read-only access. Any of them can deploy on every push.
The repository address
Use the HTTPS address, for example https://github.com/acme/billing-api, without a password or token in
it. The branch defaults to main. Redeploy builds the branch's newest commit.
Private repositories
| Access | Works with | How |
|---|---|---|
| GitHub App (recommended for GitHub) | GitHub | Connect GitHub once per workspace and choose the repositories it may read. Each build gets a one-hour, read-only token for that repository only. Enables deploy on push. |
| Deploy key | GitHub, GitLab, Bitbucket, Codeberg | OceanLaunch makes a key for the app. Add it to the repository as a read-only deploy key, then choose Check access and deploy. It never expires. |
| Access token | GitHub, GitLab, Bitbucket, Codeberg | Paste a read-only token (on GitHub, a fine-grained token with Contents: read-only on that repository). It's checked straight away and stored encrypted, and it never reaches the build or its logs. |
Connect GitHub
- In the workspace, open Settings → Integrations and choose Connect GitHub.
- On GitHub, install the OceanLaunch app on your account or organization, and pick the repositories it may read.
- Back in OceanLaunch, choose those repositories when you create apps.
A workspace can deploy the repositories that the person who connected GitHub can reach on GitHub themselves, not everything the OceanLaunch app was given: being invited to one repository of an organization doesn't open its others. Added a repository since, or missing one from the list? A workspace owner or admin who can reach it chooses Connect GitHub again.
Deploy on every push
Apps that use the GitHub App deploy by themselves when you push to their branch. The deployment's note says which commit and who pushed it. Pushing tags or to other branches does nothing, and a stopped app stays stopped.
Turn it off or on under the app's Settings → Deploy on every push.
GitLab, Bitbucket and Codeberg: a webhook
Every other Git app (GitLab, Bitbucket, Codeberg, or GitHub without the GitHub App, public or private) deploys on push through a webhook in your repository:
- Open the app's Settings → Deploy on every push and choose Set up webhook. You get a webhook URL and a secret. Copy both: the secret is shown only once.
- In your repository, add a webhook with that URL and secret, for push events only. The page shows the steps for
your host:
- GitLab: Settings → Webhooks; paste the secret as the Secret token and tick Push events.
- Bitbucket: Repository settings → Webhooks; paste the Secret and keep the Repository push trigger.
- Codeberg: Settings → Webhooks, a Forgejo webhook, content type
application/json, Push events. - GitHub: Settings → Webhooks, content type
application/json, Just the push event.
- Push, or use the host's test button. Settings shows what happened to the latest delivery, like Deployed 8f3a1c9, or why it was ignored.
A delivery deploys only when it's signed with the app's secret, comes from the app's own Git host, and moves the app's branch of the app's repository. The secret is stored encrypted, and the URL can't be read back. If either may have leaked, choose New URL and secret: the old ones stop working at once. Only workspace owners and admins can set up, replace or turn off the webhook.
Without a webhook, deploy with Redeploy.
A staging copy
To try a branch before it goes live, open the app's Settings → Staging copy, give the copy a name and the branch
(for example staging), and choose Make a staging copy. You get a separate app with its own address,
built from that branch with the same build settings, health check and repository access. With the GitHub App it
deploys on every push to that branch.
- Its variables are copied if you leave the box ticked, secrets included, except a database connection: the copy never gets the live app's database. Connect a separate database to it from Databases.
- Domains, storage, cron jobs, password protection and alerts stay with the original; add what the copy needs.
- With a deploy key, the copy gets its own key: add it to the repository before it can deploy.
- It counts as one of your plan's apps. Image apps can be copied too; upload apps can't (make a new app and upload to it).