mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-09 07:17:56 -05:00
71 lines
1.6 KiB
YAML
71 lines
1.6 KiB
YAML
# Documentation and mdbook related jobs.
|
|
|
|
name: book
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
types: [opened, reopened, synchronize, closed]
|
|
merge_group:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 60
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install bun
|
|
uses: oven-sh/setup-bun@v2
|
|
|
|
- name: Install Playwright browsers
|
|
# Required for rehype-mermaid to render Mermaid diagrams during build
|
|
run: |
|
|
cd docs/vocs/
|
|
bun i
|
|
npx playwright install --with-deps chromium
|
|
|
|
- name: Install Rust nightly
|
|
uses: dtolnay/rust-toolchain@nightly
|
|
|
|
- name: Build docs
|
|
run: cd docs/vocs && bash scripts/build-cargo-docs.sh
|
|
|
|
- name: Build Vocs
|
|
run: |
|
|
cd docs/vocs/ && bun run build
|
|
echo "Vocs Build Complete"
|
|
|
|
- name: Setup Pages
|
|
uses: actions/configure-pages@v5
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-pages-artifact@v3
|
|
with:
|
|
path: "./docs/vocs/docs/dist"
|
|
|
|
deploy:
|
|
# Only deploy if a push to main
|
|
if: github.ref_name == 'main' && github.event_name == 'push'
|
|
runs-on: ubuntu-latest
|
|
needs: [build]
|
|
|
|
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
|
|
permissions:
|
|
pages: write
|
|
id-token: write
|
|
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
|
|
timeout-minutes: 60
|
|
|
|
steps:
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@v4
|