Surf Build Server

2.0.0 · abandoned · verified Tue Apr 21

Surf is a minimalist, multi-platform, language-agnostic build server designed specifically for GitHub. It aims to simplify continuous integration by integrating directly with Git and GitHub workflows, supporting builds even without webhooks or complex firewall configurations (requiring only outgoing HTTP requests). The package, `surf-build` (version 2.0.0), provides both the `surf-run` server component and the `surf-build` command-line tool. It differentiates itself from more feature-rich CI solutions like Jenkins by offering a simple, opinionated approach. It automatically detects and builds projects using common tools (Node.js, Rust, .NET, Autotools, CMake, Xcode) or executes custom scripts (`build.sh`, `script/ci`). It lacks a dedicated UI, a plugin ecosystem, and does not support version control systems other than Git/GitHub.

Common errors

Warnings

Install

Imports

Quickstart

Demonstrates the global installation of `surf-build` and the command-line usage of `surf-run` (the build server) and `surf-build` (the one-off builder), including setting the necessary GitHub access token.

// Ensure Node.js is installed. This package is primarily a global CLI tool.
// As this package is effectively abandoned, consider modern alternatives for CI/CD.

// 1. Install Surf globally via npm:
// npm install -g surf-build

// 2. Obtain a GitHub Personal Access Token.
// Go to https://github.com/settings/tokens, generate a new token with 'repo' scope.

// 3. Set the GITHUB_TOKEN environment variable.
// This is crucial for 'surf-run' to interact with GitHub.
// For Linux/macOS:
// export GITHUB_TOKEN='YOUR_GITHUB_PERSONAL_ACCESS_TOKEN'
// For Windows (Command Prompt):
// set GITHUB_TOKEN=YOUR_GITHUB_PERSONAL_ACCESS_TOKEN
// For Windows (PowerShell):
// $env:GITHUB_TOKEN='YOUR_GITHUB_PERSONAL_ACCESS_TOKEN'

// 4. Start the Surf build server (surf-run) to monitor your repositories:
// surf-run
// This command will continuously poll GitHub for new commits in your configured repositories
// (if any, otherwise it monitors for any repo it has access to).

// 5. Alternatively, perform a one-off build for a specific commit using 'surf-build':
// Replace with your repository URL and a specific commit SHA.
// surf-build --repo https://github.com/surf-build/surf --sha 6dadf3bd5744861300eff3b640146c1cb473970f

console.log("Surf CLI commands executed. Check your terminal for build output and server status.");

view raw JSON →