deploy
Builds and deploys a Power Apps code app to Power Platform. Use when deploying changes, redeploying an existing app, or pushing updates.
它会碰到什么
这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。
技能内容
📋 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
- 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
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.
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(orpower-apps logoutonpower-apps-only projects), then retry — the CLI will re-prompt browser login. - Environment mismatch → update
environmentIdinpower.config.jsonto the correct value and retry.
Step 4: Update Memory Bank
If memory-bank.md exists, update:
- Last deployed timestamp
- App URL (if captured)
想直接用这个技能?
本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。
同名技能的其他版本
有 2 个不同仓库或目录里都有叫 deploy 的技能。它们内容并不相同,别混用:
- microsoft/power-platform-skills — Use to deploy, publish, or push an Expo/React Native Power Apps mobile app to a Power Plat