将现有 Power Pages 代码站点构建并部署到目标环境,完成认证与上传流程。
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "deploy-site" 技能: 1. 下载 https://raw.githubusercontent.com/microsoft/power-platform-skills/main/plugins/power-pages/skills/deploy-site/SKILL.md 2. 保存为 ~/.claude/skills/deploy-site/SKILL.md 3. 装好后重载技能,告诉我可以用了
请使用 deploy-site 技能,将本地已有的 Power Pages 代码站点部署到测试环境。先检查 PAC CLI 是否可用,确认登录状态和目标环境,再执行构建与上传,并告诉我结果。
完成工具检查、身份验证、环境确认、站点构建与部署,并返回部署状态或报错信息。
请把当前仓库中的 Power Pages 站点代码发布到生产环境。部署前再次确认目标环境名称,避免误发;如果缺少认证或依赖,请先提示并处理。
在明确生产环境后完成部署,必要时给出确认与修复步骤,并输出最终发布结果。
我在部署 Power Pages 代码站点时失败了。请使用 deploy-site 技能重新执行流程,并重点检查 PAC CLI、登录状态、环境选择、构建步骤和上传阶段,告诉我失败原因与修复建议。
重新执行部署流程,定位失败环节,并提供清晰的错误说明与修复建议。
Plugin check: Run
node "${CLAUDE_PLUGIN_ROOT}/scripts/check-version.js"— if it outputs a message, show it to the user before proceeding.
Guide the user through deploying an existing Power Pages code site to a Power Pages environment using PAC CLI. Follow a systematic approach: verify tooling, authenticate, confirm the target environment, build and upload the site, and handle any blockers.
Initial request: $ARGUMENTS
Goal: Ensure PAC CLI is installed and available on the system PATH
Actions:
Create todo list with all 6 phases (see Progress Tracking table)
Run to check if the PAC CLI is installed and available on the system PATH.
pac helppac help
If the command succeeds: PAC CLI is installed. Proceed to Phase 2.
If the command fails (command not found / not recognized):
Inform the user that PAC CLI is required but not installed.
Fetch installation instructions from https://aka.ms/PowerPlatformCLI using the following approach:
Tell the user: "PAC CLI is not installed. You can install it by running:"
dotnet tool install --global Microsoft.PowerApps.CLI.Tool
If dotnet is also not available, direct the user to https://aka.ms/PowerPlatformCLI for full installation instructions including .NET SDK setup.
After installation, verify by running pac help again.
If it still fails, stop and ask the user to resolve the installation manually.
Output: PAC CLI installed and verified
Goal: Ensure the user is authenticated with PAC CLI and has a valid session
Actions:
Run pac auth who to check the current authentication status.
pac auth who
If authenticated: Extract the following values from the output:
Environment ID:Cloud: (e.g., Public, UsGov, UsGovHigh, UsGovDod, China)Proceed to Phase 3.
If not authenticated:
Inform the user they are not authenticated with PAC CLI.
Use AskUserQuestion to ask for the environment URL:
| Question | Header | Options |
|---|---|---|
You are not authenticated with PAC CLI. Please provide your Power Pages environment URL (e.g., https://org12345.crm.dynamics.com) so I can authenticate you. | Auth | (free text input via "Other") |
Provide two placeholder options to guide the user:
Once the user provides the URL, run the authentication command:
pac auth create --environment "<USER_PROVIDED_URL>"
This will open a browser window for the user to sign in.
After the command completes, verify by running pac auth who again.
If authentication succeeds, proceed to Phase 3.
If authentication fails, present the error to the user and help them troubleshoot.
Output: Authenticated PAC CLI session with environment name and URL extracted
…
为 Power Apps 代码应用接入 Azure DevOps 连接器,便于查询工单、提报缺陷与管理流水线。
帮助你从需求梳理到部署上线,快速创建全新的 Power Pages 代码网站。