pages-publish-vite
Monitors the GitHub Actions deployment workflow and reports the live GitHub Pages URL. Polls the workflow run status via the GitHub API, fetches Pages info, then follows curl redirects from the canonical Pages URL to discover the actual served URL. Handles GHE environments where Pages may redirect to a codespace-style randomised subdomain. USE FOR: the final step of the Pages deployment pipeline; confirming deployment succeeded; discovering the actual live URL on GHE.
pages-publish-vite
Monitor the GitHub Actions deployment and discover the live GitHub Pages URL.
When to Use
- After
pages-push-vitehas triggered the Actions workflow - To confirm deployment succeeded and get the final live URL
- Last step of the pipeline
Pipeline Position
pages-prepare-vite → pages-build-vite → pages-commit-vite → pages-push-vite → [pages-publish-vite]
What This Skill Does
- Polls the
deploy.ymlworkflow run via the Actions API untilcompleted(or timeout) - Fetches Pages info:
GET /repos/{owner}/{repo}/pages→status,build_type,html_url - Discovers the actual live URL:
- Computes the canonical Pages URL from
host/owner/repo - Runs
curl -sIL --max-redirs 10to follow HTTP redirects to the final URL - On GHE, Pages may redirect to a codespace-style random subdomain — the script prints both
- Computes the canonical Pages URL from
How to Use
# Poll + report URL
GITHUB_TOKEN=ghp_xxx python3 skills/pages-publish-vite/scripts/publish_pages.py
# Longer timeout (default 300s)
python3 skills/pages-publish-vite/scripts/publish_pages.py --token $GITHUB_TOKEN --timeout 600
# Skip polling — just report the URL (useful when workflow already finished)
python3 skills/pages-publish-vite/scripts/publish_pages.py --token $GITHUB_TOKEN --no-poll
# No token — URL discovery only (no API polling)
python3 skills/pages-publish-vite/scripts/publish_pages.py
Arguments
| Arg | Default | Description |
|---|---|---|
--token TOKEN | $GITHUB_TOKEN | GitHub PAT |
--remote NAME | origin | Git remote to parse |
--repo OWNER/REPO | from remote | Override remote detection |
--timeout N | 300 | Seconds to wait for workflow |
--no-poll | off | Skip polling; go straight to URL discovery |
GHE URL Discovery
For GitHub Enterprise, the canonical URL https://pages.<ghe-host>/<owner>/<repo>/ may redirect to a different host. The script uses:
curl -sIL --max-redirs 10 \
-o /dev/null \
-w '%{url_effective}' \
https://pages.<ghe-host>/<owner>/<repo>/
The %{url_effective} format string returns the final URL after all redirects — this is the actual Pages URL to share.
Example Output
=== pages-publish-vite ===
Host: github.com
Repo: acme/my-app
── Monitoring workflow
[10:32:01] in_progress https://github.com/acme/my-app/actions/runs/12345678
✓ Workflow succeeded
── Pages API info
Status: built
Build type: workflow
API URL: https://acme.github.io/my-app/
── Discovering live URL
Pages URL: https://acme.github.io/my-app/
=== Deployment complete ===
https://acme.github.io/my-app/
Guidelines
- Run from the project root
- Requires Python 3.9+ and
curlin PATH GITHUB_TOKENneedsreposcope (to read Actions runs and Pages info)- Workflow polling interval is 10 seconds — adjust
--timeoutfor slow CI runners - If
--no-polland the workflow hasn’t finished yet, the URL may not be live yet