Skip to content

Commit

Permalink
Doc: tune doc deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
hhugo committed Jan 10, 2022
1 parent 8a935f5 commit 0c11288
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 37 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,7 @@ jobs:
if: ${{ !matrix.skip-doc && github.event_name == 'push' && github.ref == 'refs/heads/master'}}
run: |
opam install odoc
opam exec -- dune clean
opam exec -- dune build @ocsigen-doc
rm -rf doc-dev
mkdir doc-dev
rsync -av _build/default/_doc/_html/ doc-dev/api
rsync -av --exclude=".*" _build/default/manual/ doc-dev/manual
find doc-dev/ -name dune -delete
find doc-dev/ -name "*.exe" -delete
opam exec -- make doc
- name: synchronize doc
if: ${{ !matrix.skip-doc && github.event_name == 'push' && github.ref == 'refs/heads/master' }}
Expand Down
14 changes: 2 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,8 @@ benchmarks/build
benchmarks/results
benchmarks/config

api/wiki/
api/html
manual/files/boulderdash/
manual/files/cubes/
manual/files/graph_viewer/
manual/files/hyperbolic/
manual/files/minesweeper/
manual/files/planet/
manual/files/toplevel/
manual/files/webgl/
manual/files/wiki/
manual/files/wysiwyg/
doc-dev
_wikidoc

toplevel/examples/lwt_toplevel_bin/*.cmis.js
toplevel/examples/lwt_toplevel_bin/test_dynlink.js
Expand Down
4 changes: 1 addition & 3 deletions HACKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@

# Documentation generation
* make doc
* git checkout wikidoc && git reset --hard origin/wikidoc && git checkout master
* make installdoc
* cd _wikidoc
* git diff # review diff
* git commit -am "sync doc" && git push origin wikidoc
* cd ..
* git commit -am "sync doc"
* git push origin wikidoc
19 changes: 11 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,15 @@ tests:
test runtest runtests: tests

doc:
dune build @ocsigen-doc
rm -rf doc-dev
mkdir doc-dev
dune clean
dune build @doc --cache=disabled --force
rsync -av _build/default/_doc/_html/ doc-dev/api
dune build @doc-manual --cache=disabled --force
rsync -av --exclude=".*" _build/default/manual/ doc-dev/manual
find doc-dev/ -name dune -delete
find doc-dev/ -name "*.exe" -delete

promote:
dune promote
Expand All @@ -20,12 +28,7 @@ clean:
dune clean

installdoc:
rm -rf _wikidoc
git clone ./ _wikidoc
(cd _wikidoc && git checkout wikidoc)
rm -rf _wikidoc/doc/dev/*
cp -r _build/default/_doc/_html _wikidoc/doc/dev/api
cp -r _build/default/manual _wikidoc/doc/dev/manual
find _wikidoc/doc/dev/ -name dune -delete
git worktree add _wikidoc origin/wikidoc
rsync -av doc-dev/ _wikidoc/doc/dev/

.PHONY: all tests test runtest runtests doc clean installdoc
4 changes: 0 additions & 4 deletions api/dune
Original file line number Diff line number Diff line change
@@ -1,4 +0,0 @@
(alias
(name ocsigen-doc)
(deps
(alias ../doc)))
2 changes: 2 additions & 0 deletions dune
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@
%{dep:tools/version/gen/gen.exe}
%{dep:VERSION}
%{dep:tools/version/GIT-VERSION}))))

(data_only_dirs _wikidoc doc-dev)
2 changes: 1 addition & 1 deletion manual/dune.inc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

(rule
(alias ocsigen-doc)
(alias doc-manual)
(deps
../toplevel/examples/lwt_toplevel/index.html
../toplevel/examples/lwt_toplevel/toplevel.js
Expand Down
2 changes: 1 addition & 1 deletion manual/gen_dune_inc.ml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ let _ =
Format.std_formatter
{|
(rule
(alias ocsigen-doc)
(alias doc-manual)
(deps@;<0 2>@[<v 0>%a@])
(action (progn@;<0 2>@[<v 0>%a%a@])))
|}
Expand Down

0 comments on commit 0c11288

Please sign in to comment.