Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .claude/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version": "0.0.1",
"configurations": [
{
"name": "robokit-site",
"runtimeExecutable": "make",
"runtimeArgs": ["serve"],
"port": 8734
}
]
}
46 changes: 46 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Build and check the site on every repo; only the public repo publishes it to GitHub Pages.
name: build

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

concurrency:
group: website-${{ github.ref }}
cancel-in-progress: false

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- uses: astral-sh/setup-uv@v5
- run: make test
- run: make site
- run: make check-site
- uses: actions/upload-pages-artifact@v3
with:
path: _page

deploy:
if: github.repository == 'openrobokit/website' && github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4
172 changes: 172 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
# Built site, assembled by `make site`
/_page/

# Logs
logs
*.log
__pycache__/

# Local review artifacts are not website assets.
/.playwright-cli/
/output/
/playwright-report/
/test-results/
/Screenshot*.png
.DS_Store
.venv/
.pytest_cache/
.ruff_cache/
.mypy_cache/

# Draft GraspKit renders stay local; its tracked still provides the public fallback.
assets/videos/graspkit*.mp4

# Camera footage the showcase clips are cut from: gigabytes of source, not site
# assets. scripts/encode_showcase.py reads it from here.
/footage/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.*
!.env.example

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist
.output

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp directory
.temp

# Sveltekit cache directory
.svelte-kit/

# vitepress build output
**/.vitepress/dist

# vitepress cache directory
**/.vitepress/cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# Firebase cache directory
.firebase/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# pnpm
.pnpm-store

# yarn v3
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# Vite files
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
.vite/

# VSCode settings
.vscode/

# Wrangler local state
.wrangler/
70 changes: 70 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Only `make import` reaches outside this checkout. A plain build reads the
# committed corpus, so CI and a fresh clone both work with no sibling repos.
PROJECT ?=
SRC ?=
PORT ?= 8734

# What a browser is allowed to see. Everything else in the checkout -- the
# scripts, the Makefile, the README -- is how the site is made, not part of it.
PUBLIC = index.html CNAME .nojekyll assets graspkit retargetingkit robokit roboskills

.PHONY: serve import pages site benchmark-image check-docs check-site test clean

# The pages use root-relative paths, so the site must be served from this
# built directory — opening HTML over file:// will not resolve /assets or /data.
serve: site
python3 scripts/serve.py $(PORT) _page

# Convert one product repo's Markdown into its own file under data/docs/, then
# rebuild. Each kit owns one path, so two imports never touch the same file.
#
# make import PROJECT=retargetingkit SRC=../retargetingkit
#
# In CI this runs from the product repo, which then commits the result here.
import:
@test -n "$(PROJECT)" || { echo "PROJECT= is required"; exit 1; }
@test -n "$(SRC)" || { echo "SRC= is required"; exit 1; }
@test -f "scripts/import_$(PROJECT)_docs.py" -o -n "$(filter robokit graspkit,$(PROJECT))" \
|| { echo "no importer for $(PROJECT)"; exit 1; }
uv run scripts/$(if $(filter robokit graspkit,$(PROJECT)),import_docs.py --project $(PROJECT),import_$(PROJECT)_docs.py) $(SRC)
$(MAKE) site

# Rebuild from the committed corpus.
pages: site

# Assemble the complete site without writing generated files into source paths.
# Everything it needs is committed here, so this works on a bare clone.
site: clean
mkdir -p _page/data
cp -R $(PUBLIC) _page/
cp -R data/projects.js data/showcase.js data/showcase _page/data/
# Notes written for maintainers are not part of the site.
find _page -name README.md -delete
uv run --python 3.12 scripts/build_docs.py

# The converters use 3.10+ syntax, so pin the interpreter rather than trust
# whatever `python3` happens to be on the machine.
test:
cd scripts && uv run --python 3.12 --with xdoctest --with griffe python -m unittest discover -p 'test_*.py'
node --test scripts/test_code_controls.js
@for file in assets/js/*.js data/*.js data/docs/*.js; do node --check "$$file" || exit 1; done

# Fails if importing one project's docs would change anything. Needs its source.
check-docs:
$(MAKE) import PROJECT=$(PROJECT) SRC=$(SRC)
git diff --exit-code HEAD -- data/docs/ assets/docs/
test -z "$$(git ls-files --others --exclude-standard -- data/docs/ assets/docs/)"

# Render the speed bars as robokit's README image (3120x1356) from the built
# page. OUT defaults to output/robokit-benchmarks.png; .webp is the README's.
#
# make benchmark-image OUT=../robokit/docs/assets/robokit-benchmarks.webp
benchmark-image: site
uv run --python 3.12 --with playwright==1.55.0 --with pillow python scripts/export_benchmark_image.py $(if $(OUT),--out $(OUT))

# Check links, search coverage, repeatable output, and unchanged source files.
check-site:
uv run --python 3.12 scripts/check_site.py

clean:
rm -rf _page
Loading
Loading