44 push :
55 branches-ignore :
66 - master
7+ # edgcpp/compiler triggers this (on develop) when doc/ changes on its main
8+ # branch, to republish https://edgcpp.org/dev/doc/.
9+ workflow_dispatch :
710
811# Serialize runs (replaces the CircleCI eddiewebb/queue orb).
912concurrency :
@@ -13,6 +16,8 @@ concurrency:
1316env :
1417 # Tag of edgcpp/compiler whose documentation is published at
1518 # https://edgcpp.org/doc/. Bump this to publish a newer release's docs.
19+ # The documentation for its main branch is published at
20+ # https://edgcpp.org/dev/doc/.
1621 COMPILER_DOC_REF : ' 7.0'
1722
1823jobs :
2227 - uses : actions/checkout@v5
2328 - name : Build compiler documentation
2429 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/
30+ .github/scripts/build-compiler-docs.sh "$COMPILER_DOC_REF" doc
31+ .github/scripts/build-compiler-docs.sh main dev/doc
3732 - uses : ruby/setup-ruby@v1
3833 with :
3934 ruby-version : ' 4.0'
5045 - uses : actions/checkout@v5
5146 - name : Build compiler documentation
5247 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/
48+ .github/scripts/build-compiler-docs.sh "$COMPILER_DOC_REF" doc
49+ .github/scripts/build-compiler-docs.sh main dev/doc
6550 - uses : ruby/setup-ruby@v1
6651 with :
6752 ruby-version : ' 4.0'
7863 mv _site/* .
7964 rm -r _site/
8065 # 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.
66+ # again, which drops the documentation's _static/ and _sources/
67+ # directories.
8368 touch .nojekyll
8469 git config --global user.name "GitHub Actions"
8570 git config --global user.email "actions@edgcpp.org"
0 commit comments