Agent Skills: surge-deploy

Deploy a directory to surge.sh and return the URL

UncategorizedID: michaelvessia/nixos-config/surge-deploy

Install this agent skill to your local

pnpm dlx add-skill https://github.com/MichaelVessia/nixos-config/tree/HEAD/modules/programs/agents/shared/skills/surge-deploy

Skill Files

Browse the full folder contents for surge-deploy.

Download Skill

Loading file tree…

modules/programs/agents/shared/skills/surge-deploy/SKILL.md

Skill Metadata

Name
surge-deploy
Description
Deploy a directory to surge.sh and return the URL

surge-deploy

Arguments: $ARGUMENTS (required). Path to a directory containing static files to deploy. Optionally followed by a custom subdomain (without .surge.sh).

Steps

  1. Resolve the deploy directory from $ARGUMENTS. Confirm it exists and contains at least one file.
  2. Generate a domain:
    • If a custom subdomain was provided, use <subdomain>.surge.sh.
    • Otherwise, generate one: $(uuidgen | tr '[:upper:]' '[:lower:]').surge.sh
  3. Deploy:
    bunx surge "$DEPLOY_DIR" --domain "$DOMAIN"
    
  4. Print the live URL: https://$DOMAIN