@@ -10,11 +10,30 @@ concurrency:
1010 group : build_and_deploy
1111 cancel-in-progress : false
1212
13+ env :
14+ # Tag of edgcpp/compiler whose documentation is published at
15+ # https://edgcpp.org/doc/. Bump this to publish a newer release's docs.
16+ COMPILER_DOC_REF : ' 7.0'
17+
1318jobs :
1419 test :
1520 runs-on : ubuntu-latest
1621 steps :
1722 - uses : actions/checkout@v5
23+ - name : Build compiler documentation
24+ run : |
25+ # Fetch only doc/ at the tag; a full checkout of the tree is over 3 GB.
26+ git -c advice.detachedHead=false clone --depth 1 \
27+ --branch "$COMPILER_DOC_REF" --filter=blob:none --sparse \
28+ https://github.com/edgcpp/compiler.git /tmp/compiler
29+ git -C /tmp/compiler sparse-checkout set doc
30+ docker run --rm \
31+ -v /tmp/compiler:/work \
32+ -w /work/doc \
33+ edgcpp/sphinx-env:latest \
34+ make dirhtml
35+ mkdir -p doc
36+ cp -a /tmp/compiler/doc/build/dirhtml/. doc/
1837 - uses : ruby/setup-ruby@v1
1938 with :
2039 ruby-version : ' 4.0'
2948 contents : write
3049 steps :
3150 - uses : actions/checkout@v5
51+ - name : Build compiler documentation
52+ run : |
53+ # Fetch only doc/ at the tag; a full checkout of the tree is over 3 GB.
54+ git -c advice.detachedHead=false clone --depth 1 \
55+ --branch "$COMPILER_DOC_REF" --filter=blob:none --sparse \
56+ https://github.com/edgcpp/compiler.git /tmp/compiler
57+ git -C /tmp/compiler sparse-checkout set doc
58+ docker run --rm \
59+ -v /tmp/compiler:/work \
60+ -w /work/doc \
61+ edgcpp/sphinx-env:latest \
62+ make dirhtml
63+ mkdir -p doc
64+ cp -a /tmp/compiler/doc/build/dirhtml/. doc/
3265 - uses : ruby/setup-ruby@v1
3366 with :
3467 ruby-version : ' 4.0'
4477 find . -maxdepth 1 ! -name '_site' ! -name '.git' -exec rm -rf {} \;
4578 mv _site/* .
4679 rm -r _site/
80+ # Serve master as-is. Without this, GitHub Pages runs Jekyll over it
81+ # again, which drops the documentation's doc/_static/ and
82+ # doc/_sources/ directories.
83+ touch .nojekyll
4784 git config --global user.name "GitHub Actions"
4885 git config --global user.email "actions@edgcpp.org"
4986 git add .
0 commit comments