{"library":"ghp-import","code":"# Using as a command-line tool (recommended for typical use cases)\n# Assuming your built documentation is in a 'docs_output' directory\n# This command will create/update the gh-pages branch, add a .nojekyll file, and push.\nghp-import -n -p -f docs_output\n\n# Using programmatically (if you need to integrate into a Python script)\nfrom ghp_import import ghp_import\n\n# Example: deploy 'build' directory, push to origin, include .nojekyll\nghp_import('build', push=True, nojekyll=True, mesg='Update GitHub Pages via script')\n","lang":"bash","description":"The most common way to use ghp-import is as a command-line tool, pointing it to your generated static files. The example shows how to deploy a 'docs_output' directory to the 'gh-pages' branch, automatically add a '.nojekyll' file (to prevent Jekyll processing), and push to the remote. It also includes a Python programmatic example for more advanced integration.","tag":null,"tag_description":null,"last_tested":"2026-04-24","results":[{"runtime":"python:3.10-alpine","exit_code":1},{"runtime":"python:3.10-slim","exit_code":1},{"runtime":"python:3.11-alpine","exit_code":1},{"runtime":"python:3.11-slim","exit_code":1},{"runtime":"python:3.12-alpine","exit_code":1},{"runtime":"python:3.12-slim","exit_code":1},{"runtime":"python:3.13-alpine","exit_code":1},{"runtime":"python:3.13-slim","exit_code":1},{"runtime":"python:3.9-alpine","exit_code":1},{"runtime":"python:3.9-slim","exit_code":1}]}