Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
cbd48c9
Initiate docusaurus website
dannywillems Jul 22, 2025
a9a0500
Update CLAUDE with doc related instructions
dannywillems Jul 22, 2025
9d08c5d
Add trailing whitespace checking and fixing infrastructure
dannywillems Jul 22, 2025
82220cf
CI: Add comprehensive documentation workflow
dannywillems Jul 22, 2025
c1339e7
Makefile: add docs rust related targets
dannywillems Jul 22, 2025
e336cf2
Remove trailing whitespaces from all source files
dannywillems Jul 22, 2025
bacf4ad
docs: fix bare URL warnings in Rust documentation
dannywillems Jul 22, 2025
d424020
Website/docs: fix hyperlink
dannywillems Jul 22, 2025
2583de0
Run make format-md
dannywillems Jul 22, 2025
2c80503
p2p/cluster/testing: rename PORTS in GLOBAL_PORTS to rm name clash
dannywillems Jul 22, 2025
87b2a32
Docs: fix broken links
dannywillems Jul 22, 2025
4b65f0a
Website: add SEO and socials of o1Labs
dannywillems Jul 22, 2025
1b2ab27
Docs/rust: use nightly to generate
dannywillems Jul 22, 2025
7dcf98b
Website: remove intro.md
dannywillems Jul 22, 2025
8b92417
Website: remove leftover from initial docusaurus setup
dannywillems Jul 22, 2025
0243bb0
Website: imported missing docs
dannywillems Jul 22, 2025
6a38c8b
Docs: remove directory as moved to website
dannywillems Jul 22, 2025
f72eeab
Website: update logo to use Mina
dannywillems Jul 22, 2025
211a6bb
Update website title
dannywillems Jul 22, 2025
e790c10
CI: fix SQLx compilation errors in lint workflow
dannywillems Jul 22, 2025
2736505
Website: use absolute links to GH develop branch
dannywillems Jul 22, 2025
a23d4f1
Website: update config to enforce link integrity
dannywillems Jul 22, 2025
875fe55
Makefile: format-md include MDX files
dannywillems Jul 22, 2025
c1c43cc
Website: add getting-started section for devs
dannywillems Jul 22, 2025
9f02aa0
CHANGELOG: update for this patch
dannywillems Jul 22, 2025
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
182 changes: 182 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
name: Documentation

on:
push:
branches:
- develop
tags:
- 'v*'
paths:
- 'website/**'
- 'docs/**'
- '.github/workflows/docs.yaml'
pull_request:
paths:
- 'website/**'
- 'docs/**'
- '.github/workflows/docs.yaml'
workflow_dispatch:

env:
NODE_VERSION: '20'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
# Test documentation build
test-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
cache-dependency-path: website/package-lock.json

- name: Setup build dependencies
run: |
sudo apt update
sudo apt install -y protobuf-compiler

- name: Install dependencies
run: make docs-install

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
toolchain: nightly

- name: Test documentation build
run: make docs-build

- name: Upload build artifacts for testing
uses: actions/upload-artifact@v4
with:
name: docs-build-test
path: website/build
retention-days: 1


# Deploy to GitHub Pages (only on develop branch)
deploy:
if: github.ref == 'refs/heads/develop' && github.event_name == 'push'
needs: [test-docs]
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

permissions:
contents: read
pages: write
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Full history for versioning

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
cache-dependency-path: website/package-lock.json

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Setup build dependencies
run: |
sudo apt update
sudo apt install -y protobuf-compiler

- name: Install documentation dependencies
run: make docs-install

- name: Build documentation
run: |
cd website
# Set base URL for GitHub Pages
echo "Building documentation for GitHub Pages..."
npm run build
env:
NODE_ENV: production

- name: Upload to GitHub Pages
uses: actions/upload-pages-artifact@v3
with:
path: website/build

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

# Create versioned documentation on tag creation
version-docs:
if: startsWith(github.ref, 'refs/tags/v')
needs: [test-docs]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
cache-dependency-path: website/package-lock.json

- name: Install dependencies
run: make docs-install

- name: Extract version from tag
id: version
run: |
VERSION=${GITHUB_REF#refs/tags/v}
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Creating version $VERSION"

- name: Create versioned documentation
run: |
cd website
# Create a new version of the documentation
npm run docusaurus docs:version ${{ steps.version.outputs.version }}

- name: Setup build dependencies
run: |
sudo apt update
sudo apt install -y protobuf-compiler

- name: Build versioned documentation
run: |
cd website
npm run build
env:
NODE_ENV: production

- name: Create versioned documentation archive
run: |
cd website/build
tar -czf "../../openmina-docs-${{ steps.version.outputs.version }}.tar.gz" .
cd ../..
zip -r "openmina-docs-${{ steps.version.outputs.version }}.zip" website/build

- name: Upload versioned documentation as release asset
uses: actions/upload-artifact@v4
with:
name: versioned-docs-${{ steps.version.outputs.version }}
path: |
openmina-docs-${{ steps.version.outputs.version }}.tar.gz
openmina-docs-${{ steps.version.outputs.version }}.zip
9 changes: 8 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,22 @@ jobs:
- name: Setup build dependencies
run: |
sudo apt update || true
sudo apt install -y protobuf-compiler || true
sudo apt install -y protobuf-compiler sqlite3 || true
- name: Setup SQLite database for SQLx
run: |
sqlite3 /tmp/heartbeats.db < tools/heartbeats-processor/schema.sql
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.toolchain }}
components: clippy, rustfmt
- name: Run make check
run: make check
env:
DATABASE_URL: "sqlite:///tmp/heartbeats.db"
- name: Run make lint
run: make lint
env:
DATABASE_URL: "sqlite:///tmp/heartbeats.db"

lint-tx-fuzzing:
name: Lint transaction Fuzzing - ${{ matrix.os }} - Rust ${{ matrix.toolchain }}
Expand Down
100 changes: 100 additions & 0 deletions .github/workflows/test-docs-scripts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Test Documentation Scripts

# This workflow tests the documentation setup scripts to ensure they work correctly.
# It runs nightly and on-demand to avoid slowing down regular development workflow,
# since documentation builds can take a long time to complete.
on:
pull_request:
types: [labeled]
# Only runs when 'test-doc-scripts' label is added to a PR
schedule:
# Run nightly to catch environment drift and ensure scripts stay functional
- cron: '0 2 * * *'
workflow_dispatch:
# Allow manual triggering for testing

jobs:
test-system-setup:
name: Test System Setup Scripts (${{ matrix.os }})
runs-on: ${{ matrix.os }}
# Only run if the event is scheduled, manual, or PR has test-doc-scripts label
# This prevents long-running tests from blocking regular development workflow
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'test-doc-scripts')
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-24.04]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Test system dependencies installation
run: |
./website/docs/developers/scripts/setup/install-system-deps.sh

- name: Test Node.js installation
run: |
./website/docs/developers/scripts/setup/install-nodejs.sh

- name: Test Rust installation
run: |
./website/docs/developers/scripts/setup/install-rust.sh

- name: Test WASM tools installation
run: |
# Source cargo environment first
source ~/.cargo/env
./website/docs/developers/scripts/setup/install-wasm-tools.sh

- name: Test specialised builds
run: |
# Source cargo environment first
source ~/.cargo/env
./website/docs/developers/scripts/setup/build-specialized.sh

- name: Test format and lint
run: |
# Source cargo environment first
source ~/.cargo/env
./website/docs/developers/scripts/setup/format-and-lint.sh

- name: Test run tests
run: |
# Source cargo environment first
source ~/.cargo/env
./website/docs/developers/scripts/setup/run-tests.sh

- name: Verify installations
run: |
echo "Verifying installed tools..."
source ~/.cargo/env
rustc --version
cargo --version
node --version
npm --version
protoc --version
sqlite3 --version
wasm-pack --version

test-docker-setup:
name: Test Docker Setup Script (${{ matrix.os }})
runs-on: ${{ matrix.os }}
# Only run if the event is scheduled, manual, or PR has test-doc-scripts label
# This prevents long-running tests from blocking regular development workflow
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'test-doc-scripts')
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-24.04]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Test Docker installation
run: |
./website/docs/developers/scripts/setup/install-docker.sh

- name: Verify Docker installation
run: |
sudo docker --version
sudo docker run hello-world
17 changes: 17 additions & 0 deletions .github/workflows/whitespace-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Trailing Whitespace Check

on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]

jobs:
check-whitespace:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Check for trailing whitespaces
run: make check-trailing-whitespace
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,7 @@ pkg/

# Outputs of build-tests-webrtc
cargo-build-test.json
tests.tsv
tests.tsv

# Generated API docs should not be committed
website/static/api-docs/
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([#1236](https://github.com/o1-labs/openmina/pull/1236), fix
[#1158](https://github.com/o1-labs/openmina/issues/1158))

### Added

- **Documentation**: Complete Docusaurus-based documentation website with
comprehensive guides for node runners, developers, and researchers
([#1234](https://github.com/o1-labs/openmina/pull/1234)). It migrates all the
documentation from `docs` to `website/docs`. It includes SEO metadata and
social media integration.
- **Documentation**: Developer getting-started guide with automated setup
scripts for system dependencies, Rust toolchain, Node.js, Docker, and WASM
tools. This is run nightly and on-demand via PR labels to avoid blocking
development workflow. ([#1234](https://github.com/o1-labs/openmina/pull/1234)).
- **Development Tools**: Enhanced formatting infrastructure with MDX file
support and trailing whitespace management
([#1234](https://github.com/o1-labs/openmina/pull/1234))

### Changed

- **Build System**: Enhanced Makefile with documentation-related targets and comprehensive formatting commands ([#1234](https://github.com/o1-labs/openmina/pull/1234))

### Fixed

- **Documentation**: Resolved broken links and bare URL warnings in Rust
documentation ([#1234](https://github.com/o1-labs/openmina/pull/1234))
- **Build System**: Fixed SQLx compilation errors in lint workflow
([#1234](https://github.com/o1-labs/openmina/pull/1234))
- **Formatting**: Standardized markdown and MDX files to 80-character line
wrapping ([#1234](https://github.com/o1-labs/openmina/pull/1234))

### Dependencies

- bump proc-macro2 from 1.0.93 to 1.0.95
Expand Down
Loading