Skip to content
Skills Library
DevOps & cloud · Automation

pf-deploy

/pf-deploy

Deploy a PatternFly React project to GitHub Pages using pfcli deploy. Use when publishing a prototype, sharing a demo URL, deploying to GitHub Pages, or when the user mentions pfcli deploy.

Repository
ai-helpers ↗
Licence
MIT
Last repository change
11.08.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
3
Deprecation

No signals detected. Repository changed on 11.08.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Deploy a PatternFly React project to GitHub Pages using pfcli deploy. Use when publishing a prototype, sharing a demo URL, deploying to GitHub Pages, or when the user mentions pfcli deploy.

Original author description

Deploy a PatternFly React project to GitHub Pages using pfcli deploy. Use when publishing a prototype, sharing a demo URL, deploying to GitHub Pages, or when the user mentions pfcli deploy.

How it works

  1. Prerequisites
  2. Deploy workflow
  3. Troubleshooting
Original SKILL.md headings · 98 lines, 598 words
SKILL.md preview
---
name: pf-deploy
description: Deploy a PatternFly React project to GitHub Pages using pfcli deploy. Use when publishing a prototype, sharing a demo URL, deploying to GitHub Pages, or when the user mentions pfcli deploy.
disable-model-invocation: true
---

# Deploy to GitHub Pages with pfcli

Build the project and publish it to GitHub Pages with a single command. `pfcli deploy` runs the build, configures asset paths for project pages, enables GitHub Pages when possible, and pushes to the `gh-pages` branch.

## Prerequisites

Verify before deploying:

1. **PatternFly CLI** — `pfcli --version` or `patternfly-cli --version`. If missing, install from [patternfly/patternfly-cli](https://github.com/patternfly/patternfly-cli).
2. **GitHub CLI** — `gh auth status` must show a logged-in account with repo access.
3. **Git remote** — the project must have an `origin` remote pointing at GitHub (`git remote get-url origin`). If missing, run `pfcli init` first.
4. **Build script** — `package.json` must define a `build` script unless deploying prebuilt output with `--no-build`.

Run from the project root (or pass the path as the final argument).

## Deploy workflow

```text
Task progress:
- [ ] Confirm prerequisites
- [ ] Commit or stash uncommitted work if the user wants a clean deploy
- [ ] Run pfcli deploy
- [ ] Share the live URL with the user
```

### Step 1: Confirm the project is ready

From the project root:

```bash
test -f package.json && git remote get-url origin
gh auth status
```

If there is no GitHub remote, run `pfcli init` in the project directory and follow its prompts to create or connect a repository.

If the user has uncommitted changes they want on GitHub before deploying, run `pfcli save` first.

### Step 2: Deploy

Default deploy (build + publish `dist/` to `gh-pages`):

```bash
pfcli deploy
```

Common options:

| Flag | Purpose |
|------|---------|
| `-d, --dist-dir <dir>` | Output folder (default: `dist`) |
| `--no-build` | Deploy existing build output only |
| `-b, --branch <branch>` | Deploy branch (default: `gh-pages`) |
| `--base <path>` | Override public asset path (default: derived from repo name) |

Examples:

```bash
# Deploy a project in another directory
pfcli deploy ./my-app

# CRA or webpack output in build/
pfcli deploy -d build

# Skip build when dist/ is already built
pfcli deploy --no-build

# User/org site served from root (e.g. owner.github.io)
pfcli deploy --base /
```

For project repos (`github.com/owner/my-app`), `pfcli deploy` automatically sets Vite `--base`, webpack `ASSET_PATH`, or CRA `PUBLIC_URL` to `/<repo>/`.

If the app uses React Router, remind the user to set `basename` to match the public path (e.g. `<BrowserRouter basename="/my-app">`).

### Step 3: Share the result

On success, the CLI prints the live URL:

- Project page: `https://<owner>.github.io/<repo>/`
- User/org page: `https://<owner>.github.io/`

Tell the user the URL may take a minute to update on first deploy. If Pages is not enabled, they can set **Settings → Pages → Source** to the `gh-pages` branch.

## Troubleshooting

| Error | Likely cause | Fix |
|-------|--------------|-----|
| `Please save your changes first...` | No `origin` remote | Run `pfcli init` or add `git remote add origin ...` |
| `No package.json found` | Wrong directory | `cd` to project root or pass the path |
| `No "build" script found` | Missing build script | Add `"build"` to `package.json` or use `--no-build -d <dir>` |
| `Build output directory "dist" does not exist` | Wrong output dir or failed build | Fix the build or pass `-d` with the correct folder |
| Blank page or missing assets | Wrong base path | Re-deploy; for custom hosting use `--base /<repo>/` |
| `gh auth` failures | GitHub CLI not authenticated | Run `gh auth login` |

Do not manually configure GitHub Actions or gh-pages npm scripts when `pfcli deploy` is available — the CLI handles build env vars, SPA `404.html`, and Pages setup.

Versions

RepositoryScoreLicence
This page · patternfly/ai-helpers100MIT
rh-uxd/ai-helpers100MIT
singhviplove234/atelier90MIT

Database snapshot: 13.11.2026 · package version 2640a9e254f8 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100game-deploy
    Deploy browser games to here.now (default), GitHub Pages, or other hosting. Use when deploying a game, setting up hosting, or publishing a game build. Do NOT use for local development servers (use npm run dev).
  • 96deploy-fast
    Use when you need a public demo URL, a reproducible run command, or the "from prototype to scalable product" story.
  • 90docs-publish-github-pages
    Review, fix, and validate docs publishing workflows for GitHub Pages. Use this skill when a user needs a docs deploy workflow corrected, wants versioning behavior explained, needs publish triggers adjusted, or wants a Pages deployment flow verified end to end.
  • 100cloudflare-pages
    Deploy static sites to Cloudflare Pages with custom domains and CI/CD. Use when the user wants to deploy a site to Cloudflare Pages, add a custom domain to a Pages project, set up GitHub Actions CI/CD for Cloudflare Pages, roll back a deployment, or verify deployment status.…
  • 100configure-github-pages
    actions/deploy-pages workflow publishing a docs site (MkDocs, TypeDoc, Docusaurus) to GitHub Pages. Use when setting up Pages or migrating off peaceiris/actions-gh-pages.
  • 95cloudflare-deploy
    Deploy applications and infrastructure to Cloudflare using Workers, Pages, and related platform services. Use when the user asks to deploy, host, publish, or set up a project on Cloudflare.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.