Deploy your app or site from GitHub or GitLab
You keep your app’s or website’s code in GitHub or GitLab and want it to go live by itself when you push, tag or publish a release, with a check before the switch and a way back.
Before you start
- Plans: every hosting plan. There is no count of apps: your apps, workers and PHP share your plan’s memory and CPU (5 GB: 1 GB memory and 1 vCPU; 20 GB: 2 GB and 1 vCPU; 50 GB: 4 GB and 2 vCPU). A sleeping app uses no memory.
- What you can deploy: an app (Node.js, Python, Ruby or a start command, see run an app for its start file and version), a PHP site (WordPress, Laravel, plain PHP) or a static site (HTML, or a site built by
npm run build). - The repository’s address, and the branch to deploy. A public repository works with its https address; a private one needs its
git@address (in GitHub: Code > SSH) and a deploy key (step 4). - Don’t commit
node_modules, a virtual environment or passwords. For an app, put passwords in Variables (set environment variables); for a site, keep a.envfile out of Git and list it in Kept across deploys (step 2). - For a site, each deploy is a clean copy of your code. Files your site writes (uploads,
.env) must be in Kept across deploys, or the next deploy won’t have them. Files you change by FTP inpublic_htmllast only until the next deploy unless they are in Kept across deploys. - The first deploy is yours, from the panel (step 5) or from CI (the section “Deploy from CI” below). Pushes, tags and releases start deploys once the app or site is live.
Steps
Open the IT Tick Panel from your dashboard and press Apps in the left menu. If you have more than one website, pick it next to Your websites: at the top. Under Settings, choose the Kind of app: Node.js, Python, Ruby or Start command for an app, or PHP site (WordPress, Laravel, plain PHP) or Static site (HTML, a built site from npm run build). Press Save settings. For a site the page then shows Web folder and Kept across deploys; a site has no start file, workers, Restart or When idle.

Set Code comes from to Git repository, paste the Git address and write the Branch. For a site, also fill in:
- Web folder: the folder in your code that visitors see, such as
public(Laravel) ordist(a built site). Empty means the whole repository. - Kept across deploys: files and folders that stay the same from one deploy to the next, separated by commas, such as
.env, wp-content/uploads, storage. A name with a dot is a file; anything else is a folder.
Build command is optional. For a site, empty means
composer install --no-devwhencomposer.jsonis there, andnpm run buildwhenpackage.jsonhas a build script; for an app,npm run buildwhenpackage.jsonhas a build script. Press Save settings.
- Web folder: the folder in your code that visitors see, such as
Under Deploy on, choose what starts a deploy: Every push to the branch, New tags matching with a pattern such as
v*(empty means every tag), or GitHub or GitLab releases (each published release deploys its tag). Under Health check, write a path such as/healthzand the seconds to wait (5 to 300, 60 by default), or leave the path empty. Press Save settings.
For a private repository, press Make a deploy key under Git. Copy the Deploy key, then in GitHub open the repository’s Settings > Deploy keys and add it (read access is enough). In GitLab, add it under the project’s deploy keys.

Press Deploy. The deploy gets the code of the branch, builds it and starts it beside the live one. While it is checked, the deploys list shows Health check in Result. With an empty path, any answer on
/that isn’t an error passes; a path such as/healthzmust answer 2xx within the seconds you gave. A static site passes when the file exists:index.htmlfor/, or the file at your path. The first deploy of a site moves the files that were inpublic_htmlto.ittick-app/before-gitin your home (nothing is deleted);public_htmlthen points at the live deploy.
When the check passes, the deploy switches in and shows Deployed · live; open your domain to see it. If the check fails, the live deploy stays and the new one shows Failed with the reason, such as “the new deploy did not answer /healthz within 30 s (it answered 500)”. View log shows its log and what your code answered.

To deploy by itself, press Deploy on every push. The panel shows a Push address and the Secret; the secret is hidden: press Show next to it to see it.

In GitHub, open the repository’s Settings > Webhooks > Add webhook. Paste the push address as Payload URL, choose application/json and paste the secret. For Every push to the branch or New tags matching, keep “Just the push event”: it carries new tags too. For releases, choose “Let me select individual events” and tick Releases. Save. In GitLab, add a webhook with the same address, the secret as Secret token, and tick Push events, Tag push events or Releases events.
Push to the branch, push a tag that matches your pattern, or publish a release. A new deploy appears in the deploys list; Started by shows Push, New tag or Release (You, here for the panel, Deploy key (CI) for your pipeline). Pushes to other branches, tags that don’t match and other events are ignored.

To go back, press Roll back at the top: it goes to the deploy before the live one. Or press Roll back to this next to an older deploy in the list. Two deploys are kept: the live one and the one before it. A rollback switches at once, with no new build, and shows in the list as “Rolled back to” that deploy.

To stop deploying a site from Git, press Stop Git deploys.
public_htmlbecomes a normal folder again holding what is live now, and State shows Off (you can turn it on again without a new deploy). Releases and kept files stay; Deploy or Turn on brings Git deploys back. Only the Web folder is copied back: if it is a sub-folder (Laravel’spublic), the code outside it is not inpublic_html, so upload it or deploy again.
To deploy from your pipeline, press Make a deploy key under Deploy key for CI. The key is shown once, on its own page: copy it now and follow “Deploy from CI” below.

Deploy from CI
Your pipeline (GitHub Actions, GitLab CI) can deploy any branch, tag or commit after its tests pass, wait for the result and fail the job when the deploy fails. It works whatever you chose under Deploy on.
-
Make the key (step 12). Your Deploy address is shown under Deploy key for CI:
https://panel.it-tick.com/ittick-hook/<your domain>. -
In GitHub, open the repository’s Settings > Secrets and variables > Actions > New repository secret. Name it
ITTICK_DEPLOY_KEYand paste the key. In GitLab, add it as a masked CI/CD variable. -
Add this file to your repository as
.github/workflows/deploy.yml. Changeexample.comto your domain andphp tests/check.phpto your own tests:yaml# Deploy to IT Tick after the tests pass, wait for the deploy, fail the job if it fails. name: Test and deploy on: push: branches: [main] workflow_dispatch: jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - run: php tests/check.php deploy: needs: test runs-on: ubuntu-latest env: HOOK: https://panel.it-tick.com/ittick-hook/example.com KEY: ${{ secrets.ITTICK_DEPLOY_KEY }} # Apps page > Deploy key for CI steps: - name: Deploy this commit and wait run: | set -eu r=$(curl -fsS -X POST "$HOOK/deploy" -H "Authorization: Bearer $KEY" \ -H 'Content-Type: application/json' -d "{\"commit\": \"$GITHUB_SHA\"}") id=$(echo "$r" | jq -r .id) echo "Deploy $id queued" for i in $(seq 1 90); do # up to 15 minutes s=$(curl -fsS "$HOOK/deploys/$id" -H "Authorization: Bearer $KEY") state=$(echo "$s" | jq -r .state) echo "$(date +%T) $state" case "$state" in live) echo "Live: $(echo "$s" | jq -r .commit)"; exit 0 ;; failed) echo "::error::Deploy failed: $(echo "$s" | jq -r .error)" curl -fsS "$HOOK/deploys/$id/log" -H "Authorization: Bearer $KEY" | tail -n 40 exit 1 ;; esac sleep 10 done echo "::error::Deploy still not live after 15 minutes"; exit 1 -
Push to
main. The job runs your tests, sends the commit to IT Tick and waits. It ends green when the deploy is live, and red with the reason and the end of the deploy’s log when it fails; the deploys list on the Apps page shows the deploy with Started by Deploy key (CI).
What each state means, in GET <address>/deploys/<id>:
| State | Meaning |
|---|---|
queued |
Waiting for its turn. |
building |
Getting the code, installing packages, running the build command. |
health_check |
The new deploy runs beside the live one and must answer the health check. |
live |
It passed and was switched in. |
failed |
It stopped; error says why, and the live deploy stays. A failed migration in the build command stops the deploy the same way. |
The calls, with the key in the header Authorization: Bearer <key>:
| Call | What it does |
|---|---|
POST <address>/deploy with {"ref": "v1.2.0"}, {"commit": "<full 40-character commit>"} or {} (the saved branch) |
Starts a deploy. Answers 202 with id, state, status_url and log_url. |
GET <address>/deploys/<id> |
The deploy’s state, plus error and commit. |
GET <address>/deploys/<id>/log |
Its log, as text. |
GET <address>/deploys |
The last deploys. |
POST <address>/rollback with {"to": "<deploy id>"} or {} |
Goes back to that kept deploy, or to the one before the live one. |
To roll back from your pipeline or your computer:
curl -fsS -X POST "https://panel.it-tick.com/ittick-hook/example.com/rollback" \
-H "Authorization: Bearer $ITTICK_DEPLOY_KEY" -H 'Content-Type: application/json' -d '{}'
Limits for each site: 20 deploys and rollbacks an hour (pushes count too) and 1200 reads an hour. Past a limit the answer is 429, with Retry-After giving the seconds to wait. New key makes a new key and stops the old one at once (update the secret in your pipeline); Revoke key stops it at once. Pushes and the panel still deploy without a key.
If it does not work
- The deploy failed: open View log next to it. The live deploy keeps running; fix the code and push again, or roll back (step 10).
- It failed with “did not answer /healthz”: your code must answer that path with 2xx within the seconds under Health check, without what only the live site has. Check the answer in View log, or leave the path empty.
- The log says “git fetch failed”: for a private repository use the
git@address and check the deploy key is added to that repository; for a commit, send the full 40-character commit. - A push doesn’t start a deploy: make the first deploy from the panel or from CI; check the webhook’s address, content type (application/json) and secret, what you chose under Deploy on, and that the branch or tag matches. GitHub’s Recent Deliveries show our answer, such as “ignored: tag release-9 does not match v*”.
- Your
.envor uploads are gone after a deploy: add them to Kept across deploys. Kept files live in.ittick-app/sharedin your home; edit them there with the File manager. The first deploy copies them from your code, or from your oldpublic_htmlwhen Web folder is empty; otherwise a kept file starts empty. - CI gets 401 “wrong or revoked deploy key”: the key was renewed or revoked; make a new one and update
ITTICK_DEPLOY_KEY. A 429 means a limit above: wait the seconds inRetry-After. - You think the push secret leaked: press Make a new secret and paste the new one in your webhook; the old one stops working.
Related
Thanks for telling us.
Still stuck? A person will help.
Standard support comes with every plan. Premium is an add-on.
