Index of every page on this site: llms.txt
All skills
encoredev avatar

/deploy

@e86a3ab official
by Encoreencoredev/skills30 stars
6
Run it yourself

Deploy an Encore.ts or Encore.go app to Encore Cloud by pushing to the Encore git remote or a linked GitHub repository, deploy changes again, and fix deploys that fail or never start. Covers which environments a push deploys to and secrets per environment. For linking an app first, see `encore-link-app`.

  • 1 file
  • 5.8 KB
  • Updated 4 weeks ago
  • GitHub
Use this Skill: https://skilld.dev/gh/encoredev/skills/deploy

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈78 tokens for metadata: the name and description. ≈1.2k when used: this file.

Description uses 13.6% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈1086 characters, or 13.6%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Deploying to Encore Cloud

Deploying is a commit and a push to the git repository the app deploys from. Encore Cloud builds, tests, provisions infrastructure, and deploys to every environment that deploys from the pushed branch. The same steps work for Encore.ts and Encore.go.

Instructions

Find the repository the app deploys from

git remote -v
  • Encore-managed git (the default): the app deploys from the encore remote. Push there.
  • Linked GitHub repository: if the app is linked to GitHub in the Cloud Dashboard (Settings > GitHub), pushes to that repository deploy instead. Push to it, usually origin.
  • Neither: the app isn't linked to Encore Cloud yet. See Link an app.

If you can't tell which one the app deploys from, ask the user.

Check which environments a push deploys to

Each environment deploys from its own branch (the environment's Settings > Branch Push), or only manually. A new app has one environment, staging (type development), which deploys the app's main branch.

One push can deploy several environments. If a production environment deploys from the branch you're about to push, the push deploys to production, so check the branch before pushing.

Deploy

git add -A
git commit -m "Describe the change"
git push encore              # Encore-managed git
git push origin <branch>     # linked GitHub repository

Pushing to encore: a successful push prints one line per environment that's deploying:

remote: <branch>: triggered deploy https://app.encore.dev/<app-id>/envs/<env>/deploys/<id>

If no such line appears, nothing was deployed:

  • Everything up-to-date: nothing new was committed. Commit, then push again.
  • No triggered deploy line: no environment deploys from the pushed branch.

Pushing to GitHub: git prints nothing from Encore. Check Deployments in the Cloud Dashboard.

Either way, the push returns as soon as the deploy starts. Follow progress in the Cloud Dashboard, or through the Encore Cloud MCP server (https://api.encore.dev/mcp, set up with encore-mcp), which lists environments, deploys, builds, and their logs. Each environment's API is served at https://<env>-<app-id>.encr.app, unless it has a custom domain. encore logs --env=<env> streams its logs.

Deploy again

Every new commit pushed to an environment's branch deploys it again. To redeploy without a code change, for example after setting a missing secret, push an empty commit:

git commit --allow-empty -m "Redeploy"
git push encore              # Encore-managed git
git push origin <branch>     # linked GitHub repository

You can also redeploy from the Cloud Dashboard: Deployments > New Deploy > Branch.

Before pushing

  • Tests: the deploy runs the app's tests, and failing tests block it. Run them first. For Encore.ts, use CI=true encore test: a vitest script runs in watch mode without a terminal and never exits. For Encore.go, use encore test ./....

  • Secrets: every secret the app declares needs a value in each environment it deploys to, or the deploy fails with secret key(s) not defined. Set values per environment type, or for a single environment:

    printf '%s' "$VALUE" | encore secret set --type dev,local MySecret   # development environments, such as staging
    printf '%s' "$VALUE" | encore secret set --type prod MySecret        # production environments
    printf '%s' "$VALUE" | encore secret set --env <env> MySecret        # one environment

Link an app

If encore.app has an empty "id", or there's no encore remote and the app doesn't deploy from GitHub, the app isn't linked to Encore Cloud. Link it first (see encore-link-app), then come back here. For an app that's on Encore Cloud but not on this machine, clone it with encore app clone <app-id>, or git clone its GitHub repository if it's linked to GitHub.

When a push to encore fails

  • could not get Encore auth token: not logged in: log in (see encore-login).
  • 'encore' does not appear to be a git repository: the remote is missing. See Link an app.
  • The push hangs: git push encore uses SSH to git.encore.dev on port 22, which some networks block.

Guidelines

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at e86a3ab. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 4 weeks ago.

Activeupdated 4 weeks ago
Other metadata
when_to_use
User wants to deploy an Encore app, ship a change, push to Encore Cloud, deploy to staging or production, deploy again, redeploy, check whether a deploy started, or fix a failed deploy. Also use when `git push encore` fails, there is no `encore` git remote, the app is linked to GitHub, the app was created logged out or with `--platform=false`, the app was created in the Cloud Dashboard and needs to be cloned, or a deploy fails with "secret key(s) not defined" or failing tests. SKIP for self-hosting with `encore build docker`. Trigger phrases: "deploy", "deploy my app", "git push encore", "push to Encore Cloud", "deploy to staging", "deploy to production", "deploy again", "redeploy", "deploy failed", "build failed", "no encore remote", "encore app clone".

README badge

README badge for encoredev/skills/deploy