deploy-site
Deploys an existing Power Pages code site to a Power Pages environment using PAC CLI. Handles tooling verification, authentication, environment confirmation, building, and uploading
Install / Use
npx skills add microsoft/power-platform-skills --skill deploy-siteInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
OperationsSupported Platforms
Tags
Our assessment of deploy-site
deploy-site scores 85/100 on our quality scale, 505th of 736 Operations skills we index.
Its SKILL.md is 21 KB long, well organised into 31 sections with 8 code examples: a thorough specification that gives an agent plenty to work with.
It has 919 GitHub stars, a meaningful sign that others use it.
Maintenance, license and trust
- The repository was last updated 12 days ago, so deploy-site is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
deploy-site compared with similar skills
All 4 of these similar skills score higher than deploy-site; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| deploy-site (this skill)by microsoft | 85 | 919 | 12d ago | SKILL.md |
| algorithmic-artby anthropics | 100 | 177.9k | 14d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 14d ago | SKILL.md |
| designby nextlevelbuilder | 100 | 130.2k | 15d ago | SKILL.md |
| ui-ux-pro-maxby nextlevelbuilder | 100 | 130.2k | 15d ago | SKILL.md |
Frequently asked questions
- How do I install deploy-site?
- Run
npx skills add microsoft/power-platform-skills --skill deploy-site. The install tabs above show the steps for each supported agent. - Which AI agents does deploy-site work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is deploy-site safe to use?
- It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is deploy-site still maintained?
- The repository was last updated 12 days ago, so deploy-site is actively maintained.
Skill content
View source on GitHubname: deploy-site description: >- Deploys an existing Power Pages code site to a Power Pages environment using PAC CLI. Handles tooling verification, authentication, environment confirmation, building, and uploading. Use when the user wants to deploy, upload, or publish their code site. user-invocable: true allowed-tools: Read, Bash, AskUserQuestion, Glob, Grep, TaskCreate, TaskUpdate, TaskList model: sonnet
Plugin check: Run
node "${PLUGIN_ROOT}/scripts/check-version.js"— if it outputs a message, show it to the user before proceeding.
Deploy Power Pages Code Site
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.
Core Principles
- Verify before acting: Always confirm PAC CLI availability, authentication status, and the target environment before attempting any deployment.
- Use TaskCreate/TaskUpdate: Track all progress throughout all phases — create the todo list upfront with all phases before starting any work.
- Never change environment settings without consent: If deployment requires modifying environment configuration (e.g., unblocking JavaScript attachments), always explain the change and get explicit user permission first.
Initial request: $ARGUMENTS
Phase 1: Verify PAC CLI
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
pac helpto check if the PAC CLI is installed and available on the system PATH.pac 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/PowerPlatformCLIusing 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
dotnetis 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 helpagain. -
If it still fails, stop and ask the user to resolve the installation manually.
-
Output: PAC CLI installed and verified
Phase 2: Verify Authentication
Goal: Ensure the user is authenticated with PAC CLI and has a valid session
Actions:
-
Run
pac auth whoto check the current authentication status.pac auth who -
If authenticated: Extract the following values from the output:
- Environment name and URL
- Environment ID — the GUID after
Environment ID: - Cloud — the value after
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
AskUserQuestionto 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:
- "I'll paste the URL" (description: "Select 'Other' below and paste your environment URL")
- "I don't know my URL" (description: "You can find it in the Power Platform admin center under Environments > your environment > Environment URL")
-
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 whoagain. -
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
Phase 3: Confirm Environment
Goal: Ensure the user is deploying to the correct target environment
Actions:
<!-- gate: deploy-site:3.confirm-env | category=consent | cancel-leaves=nothing -->🚦 Gate (consent · deploy-site:3.confirm-env): Echo the current environment and require explicit confirmation before any upload. Covers the follow-up "pick a different env" sub-prompt in the same section — wrong-env deploys are the #1 destructive shared-state failure for this skill, so this gate must fire even when PAC CLI shows a recognizable env.
Trigger: Phase 3 entry; environment resolved from PAC CLI. Why we ask: Site uploaded to wrong tenant / wrong env — committed to a Dataverse instance the user did not intend; cleanup requires manual deletion or another deploy from a different env. Cancel leaves: Nothing — no upload fired.
-
Present the current environment information to the user and ask them to confirm.
Use
AskUserQuestionwith the following structure:| Question | Header | Options | |----------|--------|---------| | You are currently connected to environment: <ENV_NAME> (<ENV_URL>). Do you want to deploy to this environment? | Environment | Yes, use this environment, No, let me choose a different one |
-
If "Yes, use this environment": Proceed to Phase 4.
-
If "No, let me choose a different one":
-
Run
pac org listto retrieve all available environments:pac org list -
Parse the output to extract environment names and URLs.
-
Use
AskUserQuestionto present the available environments as options (pick up to 4 most relevant, or let user specify). -
Once the user selects an environment, switch to it:
pac org select --environment "<SELECTED_ENV_ID_OR_URL>" -
Verify the switch by running
pac auth whoagain.
-
Output: Confirmed target environment for deployment
Phase 4: Deploy the Code Site
Goal: Locate the project, build it, and upload to Power Pages
Actions:
4.1 Locate the Project Root
Determine the project root directory. The project root is the directory containing powerpages.config.json. Use Glob to search for it:
**/powerpages.config.json
<!-- gate: deploy-site:4.1.multi-project | category=plan | cancel-leaves=nothing -->
🚦 Gate (plan · deploy-site:4.1.multi-project): More than one
powerpages.config.jsoncandidate found — pick the right project to deploy.Trigger: Phase 4.1 glob returned multiple matches. Why we ask: Wrong project uploaded — pollutes the target env with files from a different site. Cancel leaves: Nothing — no upload fired.
If found in the current working directory or a subdirectory, use that directory as PROJECT_ROOT. If multiple are found, ask the user which one to deploy using AskUserQuestion.
If not found, ask the user to provide the path to the project root.
4.2 Offer Permissions Audit (Redeployments Only)
If .powerpages-site already exists (i.e., this is not the first deployment), table permissions and site settings may have drifted from the code since the last deployment. Offer to audit before deploying.
🚦 Gate (plan · deploy-site:4.2.audit-permissions): Re-deployment detected — offer to run
/audit-permissionsto catch drift between code and table permissions before push.Trigger:
.powerpages-siteexists (not first deployment). Why we ask: Stale permission YAML deploys, causing 403s for users until next audit run. Cancel leaves: Nothing — audit is read-only; declining just proceeds to build + upload.
Use AskUserQuestion:
| Question | Header | Options | |----------|--------|---------| | This site has been deployed before. Would you like to run a permissions audit to verify table permissions match your current code before deploying? | Audit | Yes, audit permissions (Recommended), Skip — permissions are up to date |
If "Yes": Invoke /audit-permissions to run the audit. After the audit completes, resume with Step 4.3.
If "Skip": Proceed to Step 4.3.
If .powerpages-site does not exist (first deployment), skip this step — there are no existing permissions to audit.
4.3 Build the Site
Before uploading, ensure the site is built:
cd "<PROJECT_ROOT>"
npm run build
If the build fails, stop and help the user fix the build errors before retrying.
4.4 Upload to Power Pages
Run the upload command:
pac pages upload-code-site --rootPath "<PROJECT_ROOT>"
If the upload succeeds: Proceed to Phase 5 to verify the deployment.
If the upload fails: Check the error message:
- If the failure is related to blocked JavaScript (
.js) attachments → proceed to Phase 6 - If the failure mentions
.htmltype attachments are currently blocked → this is a misleading error. See Troubleshooting: HTML Blocked Attachment Error below - For other errors → present the error to the user and help them troubleshoot
Output: Site built and uploaded to Power Pages
Phase 5: Verify Deployment
Goal: Confirm the deployment was successful and handle post-deployment steps
Actions:
5.1 Verify .powerpages-site Folder
Confirm .powerpages-site exists and list its contents (web-roles/, site-settings/, table-permissions/).
5.2 Record Skill Usage
Reference:
${PLUGIN_ROOT}/references/skill-tracking-reference.md
Follow the skill tracking instructions in the reference to record this skill's usage. Use --skillName "DeploySite".
5.3 Confirm Upload Output
Review the output from the pac pages upload-code-site command in Phase 4 (or Phase 6 retry). Verify it reported a successful upload with no errors.
5.4 Commit Changes
Stage and commit deployment artifacts:
git add -A
git commit -m "Deploy site to Power Pages"
5.5 Check Activation Status
Run the activation status check:
node "${PLUGIN_ROOT}/scripts/check-activation-status.js" --projectRoot "<PROJECT_ROOT>"
Evaluate the JSON result:
- If
activatedistrue: Inform the user their site is already activated (showwebsiteUrlif present). Proceed to step 5.6, then skip to Suggest Next Steps. Do NOT ask about activation. - If
activatedisfalse: Proceed to step 5.5.1. - If
erroris present: Fall back to step 5.5.1. Do not block the deployment flow.
5.5.1 Ask About Activation (only if site is NOT already activated)
<!-- gate: deploy-site:5.5.1.activate | category=plan | cancel-leaves=nothing -->🚦 Gate (plan · deploy-site:5.5.1.activate): Site deployed but not yet activated — offer to invoke
/activate-siteto provision the subdomain.Trigger: Phase 5.5 detected
activated:falseon a fresh deploy. Why we ask: Auto-activating writes the wrong subdomain (permanent for the site); auto-skipping leaves the site without a live URL. Cancel leaves: Nothing — no activation API call fired.
Ask the user if they want to activate the site using AskUserQuestion:
| Question | Header | Options | |----------|--------|---------| | Site deployed successfully! Would you like to activate (provision) the site now so it gets a live URL? | Activate | Activate no
Truncated for display — read the full file on GitHub.
Related Skills
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
design
130.2kComprehensive design skill: brand identity, design tokens, UI styling, logo generation (55 styles, Gemini, Atlas Cloud, or MuAPI AI), corporate identity program (50 deliverables, CIP mockups), HTML presentations (Chart.js), banner design (22 styles, social/ads/web/print), icon design (15 styles, SVG…
ui-ux-pro-max
130.2kUI/UX design intelligence for web, mobile, and desktop. This skill should be used when designing, building, reviewing, or fixing interfaces, including pages, components, design systems, accessibility, interaction, responsive layout, typography, color, charts, and stack-specific UI implementation.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
