Skip to content

Commit eeae927

Browse files
authored
refactor: docs copy from foundry template repo (#23)
* docs refactoring * re-add markdown files for vercel to deploy properly * fix: imports * fix: import lines for copytree * migrate to direct links for images * fix: script * run from upstream main * re-enable cron * automated pr label * feat: use only `docsignore` * minor comment
1 parent 7fdba4c commit eeae927

18 files changed

Lines changed: 235 additions & 24 deletions

.github/workflows/latest-docs.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Sync Latest Docs
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
commit:
7+
description: 'Commit SHA to sync from'
8+
required: true
9+
default: 'main'
10+
type: string
11+
schedule:
12+
- cron: "0 12 */3 * *" # noon every so often
13+
14+
permissions:
15+
contents: write
16+
pull-requests: write
17+
18+
env:
19+
BRANCH: "sync-${{ github.sha }}"
20+
21+
jobs:
22+
# This job just grabs the latest commits (if any) and creates a PR with the changes
23+
# if there are no changes, no PR
24+
# Another action will handle the PR verification for builds
25+
file-sync:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v4
29+
30+
# https://github.com/orgs/community/discussions/55906#discussioncomment-5946239
31+
# https://github.com/settings/personal-access-tokens/new
32+
# To verify the PR, we must set a PAT token in the secrets
33+
- name: Check for PAT
34+
run: |
35+
if [ -z "${{ secrets.GIT_WORKFLOW_PAT }}" ]; then
36+
echo "Please set the GIT_WORKFLOW_PAT secret to support PR workflow runs on generate"
37+
exit 1
38+
fi
39+
40+
- name: grab latest documentation files
41+
run: make latest-docs
42+
43+
# exits if there are no changes
44+
- uses: peter-evans/create-pull-request@v7.0.5
45+
with:
46+
base: main
47+
branch: ${{ env.BRANCH }}
48+
title: "chore: update upstream docs"
49+
commit-message: "chore: sync latest"
50+
delete-branch: true
51+
signoff: false
52+
token: ${{ secrets.GIT_WORKFLOW_PAT }}
53+
labels: |
54+
automated pr
55+
body: |
56+
Syncing the latest file commits from upstream.

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,6 @@ package-lock.json
2929
.vercel
3030
next-env.d.ts
3131
.vscode
32+
33+
# docs shallow git cloned repo
34+
dsource-*

Makefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
## latest-docs: Pulls the latest docs from upstream | make latest-docs COMMIT=<COMMIT_SHA>
2+
.PHONY: latest-docs
3+
latest-docs:
4+
@python3 ./scripts/sync_latest_docs.py $(COMMIT)
5+
6+
.PHONY: help
7+
help: Makefile
8+
@echo
9+
@echo " Choose a command run in 'dev-portal'"
10+
@echo
11+
@sed -n 's/^##//p' $< | column -t -s ':' | sed -e 's/^/ /'
12+
@echo

content/docs/benefits.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: WAVS benefits
44
import { Callout } from 'fumadocs-ui/components/callout';
55
import { Tab, Tabs } from "fumadocs-ui/components/tabs";
66

7-
<img alt="WAVS" src="/banners/benefits.png" />
7+
<img alt="WAVS" src="https://raw.githubusercontent.com/Lay3rLabs/WAVS-docs/refs/heads/main/public/banners/benefits.png" />
88

99
>WAVS is a platform that makes building AVSs easier.
1010

content/docs/guides/get-started.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ title: Get Started
44
import { Callout } from 'fumadocs-ui/components/callout';
55
import { Tab, Tabs } from "fumadocs-ui/components/tabs";
66

7-
87
This guide walks you through how to set up your environment, deploy an example service, and run a task.
98

109
## Setup

content/docs/guides/operator.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ title: Run an operator (WIP)
44
import { Callout } from 'fumadocs-ui/components/callout';
55
import { Tab, Tabs } from "fumadocs-ui/components/tabs";
66

7-
87
## Requirements
98

109
Operators running WAVS will need the following minimum requirements:

content/docs/guides/query-from-a-component.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ title: Query from a component (WIP)
44
import { Callout } from 'fumadocs-ui/components/callout';
55
import { Tab, Tabs } from "fumadocs-ui/components/tabs";
66

7-
87
## Coming soon!
98

109
This guide covers how to run a query in a service component.

content/docs/guides/tests.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ title: Testing a component
44
import { Callout } from 'fumadocs-ui/components/callout';
55
import { Tab, Tabs } from "fumadocs-ui/components/tabs";
66

7-
87
## Build your component
98

109
Use the following command to build your component:

content/docs/how-it-works.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: How it works
44
import { Callout } from 'fumadocs-ui/components/callout';
55
import { Tab, Tabs } from "fumadocs-ui/components/tabs";
66

7-
<img alt="WAVS" src="/banners/how.png" />
7+
<img alt="WAVS" src="https://raw.githubusercontent.com/Lay3rLabs/WAVS-docs/refs/heads/main/public/banners/how.png" />
88

99
WAVS is a decentralized execution framework for AVSs (Autonomous Verifiable Services), enabling the results of off-chain computation to be brought verifiably on-chain. It provides a runtime for executing WASI-based service components, allowing developers to define event-driven off-chain workflows while inheriting Ethereum's security via EigenLayer restaking.
1010

@@ -17,7 +17,7 @@ The WAVS platform comprises service components, operator networks, and on-chain
1717

1818
Before diving into each part of a WAVS service individually, it's important to understand the basic execution flow of WAVS.
1919

20-
<img alt="WAVS overview" src="/diagrams/flow.png" />
20+
<img alt="WAVS overview" src="https://raw.githubusercontent.com/Lay3rLabs/WAVS-docs/refs/heads/main/public/diagrams/flow.png" />
2121

2222
In this example, on-chain events can trigger service components, which are run off-chain by operators in the WASI AVS runtime. Results are then brought back on-chain, enabling the decentralized execution of off-chain services that are verifiable on-chain.
2323

content/docs/index.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { HomeIcon, AppWindow, CircuitBoard, Layers, Microscope, Grid2x2, Chevron
55
import { Callout } from 'fumadocs-ui/components/callout';
66
import { DocsPage } from 'fumadocs-ui/page';
77

8-
<img alt="WAVS" src="/wavs.png" />
8+
<img alt="WAVS" src="https://raw.githubusercontent.com/Lay3rLabs/WAVS-docs/refs/heads/main/public/wavs.png" />
99

1010
Welcome to the WAVS Docs!
1111

@@ -14,10 +14,10 @@ WAVS is a next-generation AVS platform that makes it easy to create, manage, and
1414
## Get started
1515

1616
<Cards>
17-
<Card
17+
<Card
1818
icon={<CircuitBoard />}
1919
href="/overview"
20-
title="WAVS Overview"
20+
title="WAVS Overview"
2121
description="Learn about WAVS"
2222
/>
2323
<Card

0 commit comments

Comments
 (0)