Skip to content

Commit

Permalink
Generate docs on ci
Browse files Browse the repository at this point in the history
  • Loading branch information
davesnx committed Nov 3, 2023
1 parent 3b1b256 commit 8f148cf
Show file tree
Hide file tree
Showing 5 changed files with 5,149 additions and 11 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ jobs:
with:
node-version: '20'

- name: Install generate-docs dependencies
run: cd generate-docs; ./install-dependencies.sh

- name: Build generate-docs
run: cd generate-docs; ./build-docs.sh

- name: Install website dependencies
run: cd website; npm install

Expand Down
2 changes: 1 addition & 1 deletion generate-docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ How to generate Reason API docs from OCaml

```bash
./install-dependencies.sh
./build-docs.sh
./build-docs.sh
```

Converted HTML is now in `output/`
22 changes: 13 additions & 9 deletions generate-docs/build-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ docs_path="../website/pages/api/"

mkdir -p ./output/
rm -f ./output/*.html
cp ocaml/ocamldoc/stdlib_html/*.html ./output/
echo ""
echo "converting docs - this will take a minute"
echo ""
node_modules/.bin/jscodeshift --extensions=html --transform=transform.js output/
mkdir -p "$docs_path"
rm -f "$docs_path"*.html
cp output/* "$docs_path"
echo "docs output to $docs_path"
ls ocaml/
ls ocaml/ocamldoc/
ls ocaml/ocamldoc/
exit 0
# cp ocaml/ocamldoc/stdlib_html/*.html ./output/
# echo ""
# echo "converting docs - this will take a minute"
# echo ""
# node_modules/.bin/jscodeshift --extensions=html --transform=transform.js output/
# mkdir -p "$docs_path"
# rm -f "$docs_path"*.html
# cp output/* "$docs_path"
# echo "docs output to $docs_path"
2 changes: 1 addition & 1 deletion generate-docs/install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if [[ ! -d "ocaml/" ]]; then
fi
cd ocaml/

git checkout 4.02.3
git checkout 5.1
./configure
make clean
make world
Expand Down
Loading

0 comments on commit 8f148cf

Please sign in to comment.