---
name: Deploy
slug: deploy-3
category: DevOps
description: Deploy builds and publishes a Power Apps code app to Power Platform. Use it when pushing changes, redeploying an app, or updating a live environment.
github: "https://github.com/microsoft/power-platform-skills/tree/main/plugins/code-apps/skills/deploy"
language: JavaScript
stars: 757
forks: 158
install: "npx degit https://github.com/microsoft/power-platform-skills/tree/main/plugins/code-apps/skills/deploy ~/.claude/skills/deploy"
installs_to: ~/.claude/skills/deploy
source_path: plugins/code-apps/skills/deploy/SKILL.md
collection_size: 25
category_size: 798
collection_url: "https://dirskills.com/collections/microsoft/power-platform-skills"
added: 2026-08-23T05:19:50.894Z
last_synced: 2026-08-23T05:19:50.894Z
canonical_url: "https://dirskills.com/skills/deploy-3"
---

# Deploy

Deploy builds and publishes a Power Apps code app to Power Platform. Use it when pushing changes, redeploying an app, or updating a live environment.

**Install:**

```bash
npx degit https://github.com/microsoft/power-platform-skills/tree/main/plugins/code-apps/skills/deploy ~/.claude/skills/deploy
```

## README

**📋 Shared Instructions: [shared-instructions.md](${PLUGIN_ROOT}/shared/shared-instructions.md)** - Cross-cutting concerns.

# Deploy

Builds and deploys the app in the current directory to Power Platform.

## Workflow

1. Check Memory Bank → 2. Build → 3. Deploy → 4. Update Memory Bank

---

### Step 1: Check Memory Bank

Check for `memory-bank.md` in the project root. If found, read it for the project name and environment. If not found, proceed — the project may have been created without the plugin.

### Step 2: Build

```bash
npm run build
```

If the build fails:

- **TS6133 (unused import)**: Remove the unused import and retry.
- **Other TypeScript errors**: Report the error with the file and line number and stop. Do not deploy a broken build.

Verify `dist/` exists with `index.html` before continuing.

### Step 3: Deploy

Ask the user: _"Ready to deploy to [environment name]? This will update the live app."_ Wait for explicit confirmation before proceeding.

> Resolve the CLI first (see [cli-binary.md](${PLUGIN_ROOT}/shared/cli-binary.md)): run as `$PA app push` (`npx --no-install pa …`), never a bare `pa`. On `power-apps`-only projects, translate to `power-apps push`.

```bash
pa app push
```

Capture the app URL from the output if present.

If deploy fails, report the error and stop — do not retry silently. Common fixes:

- Auth error / token expired → `pa auth logout` (or `power-apps logout` on `power-apps`-only projects), then retry — the CLI will re-prompt browser login.
- Environment mismatch → update `environmentId` in `power.config.json` to the correct value and retry.

### Step 4: Update Memory Bank

If `memory-bank.md` exists, update:

- Last deployed timestamp
- App URL (if captured)
