Getting Started

Surge deployment is purely CLI-based. Install surge first:

npm install -g surge

For some reasons, it does not work with yarn global add surge on my Windows 10 laptop:

[1/4] Resolving packages...
warning surge > du@0.1.0: no longer maintained
warning surge > fstream-ignore > [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning surge > request > hawk > [email protected]: This version is no longer maintained. Please upgrade to the latest version.
[2/4] Fetching packages...
info [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
error An unexpected error occurred: "EBUSY: resource busy or locked, rmdir 'C:\\%USERHOME%\\AppData\\Local\\Yarn\\Data\\global\\node_modules\\windows-build-tools\\node_modules\\.bin'".

and deploy current folder:

surge --project path/to/deployed/website --domain {my-domain}

Credentials are required here and you can create an account at this moment

Additional stuff

Surge documentation is pretty well done: