Repository navigation
Add automated doc builds via GitHub pages #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
f44497c
Add doc requirements and build location
mborland bd833c9
Add documentation workflow to CI
mborland 244219e
Update READMEs with canonical URL and build instructions
mborland 237c9d2
Add auto generated files to gitignore
mborland 635de70
/doc/ hosts the latest tagged release and /dev/doc now tracks main
mborland 62a2f59
Remove --keep-going flag
mborland bab3b2b
Update docker/sphinx-env
mborland File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| # Part of the EDG Compiler Project, under the Apache License v2.0 with LLVM | ||
| # Exceptions. | ||
| # See https://edgcpp.org/LICENSE.txt for license information. | ||
| # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
| # | ||
| # Build the Sphinx documentation in doc/ with warnings treated as errors, so | ||
| # documentation changes stay publishable. | ||
| # | ||
| # The documentation is published by the edgcpp/edgcpp.github.io site | ||
| # workflow, not from here: it builds the release tag into | ||
| # https://edgcpp.org/doc/ and main into https://edgcpp.org/dev/doc/. After a | ||
| # push to main passes the build, this asks that workflow to run so the | ||
| # development documentation is updated. That needs the SITE_DISPATCH_TOKEN | ||
| # secret: a fine-grained token for edgcpp/edgcpp.github.io only, with | ||
| # "Actions: Read and write" permission. | ||
|
|
||
| name: Documentation | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - 'doc/**' | ||
| - '.github/workflows/documentation.yml' | ||
| pull_request: | ||
| paths: | ||
| - 'doc/**' | ||
| - '.github/workflows/documentation.yml' | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: documentation-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Build HTML documentation | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 15 | ||
| steps: | ||
| - name: Check out repository | ||
| uses: actions/checkout@v7 | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v7 | ||
| with: | ||
| python-version: '3.14' | ||
| cache: pip | ||
| cache-dependency-path: doc/requirements.txt | ||
|
|
||
| - name: Install Sphinx | ||
| run: python -m pip install -r doc/requirements.txt | ||
|
|
||
| # The published site uses the dirhtml builder, so check that one. | ||
| - name: Build HTML | ||
| run: make -C doc dirhtml SPHINXOPTS="-W" | ||
|
|
||
| publish-dev: | ||
| name: Publish development documentation | ||
| needs: build | ||
| if: > | ||
| github.repository == 'edgcpp/compiler' && | ||
| github.event_name != 'pull_request' && | ||
| github.ref == 'refs/heads/main' | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 5 | ||
| steps: | ||
| - name: Trigger the edgcpp.org site build | ||
| env: | ||
| GH_TOKEN: ${{ secrets.SITE_DISPATCH_TOKEN }} | ||
| run: | | ||
| if [ -z "$GH_TOKEN" ]; then | ||
| echo "::warning::SITE_DISPATCH_TOKEN is not set, so" \ | ||
| "https://edgcpp.org/dev/doc/ was not updated." | ||
| exit 0 | ||
| fi | ||
| gh workflow run build_and_deploy.yml \ | ||
| --repo edgcpp/edgcpp.github.io --ref develop |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| requirements.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # Part of the EDG Compiler Project, under the Apache License v2.0 with LLVM | ||
| # Exceptions. | ||
| # See https://edgcpp.org/LICENSE.txt for license information. | ||
| # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
|
||
| # This script is executed by build-edg-env before creation of the Docker image | ||
| # to copy in the documentation's requirements.txt file. | ||
|
|
||
| import os | ||
| import shutil | ||
|
|
||
| import edgtools | ||
|
|
||
| from pathlib import Path | ||
|
|
||
| def copy_requirements_file() -> None: | ||
| '''Copy doc/requirements.txt for use by the Dockerfile.''' | ||
| doc_dir = edgtools.get_tools_dir().parent / 'doc' | ||
| shutil.copy(doc_dir / 'requirements.txt', Path(os.getcwd())) | ||
|
|
||
| def main() -> None: | ||
| copy_requirements_file() | ||
|
|
||
| main() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # Python packages needed to build the documentation. These are the exact | ||
| # versions the documentation check (.github/workflows/documentation.yml) | ||
| # builds with. Sphinx 9.1 requires Python 3.12 or newer. | ||
| Sphinx==9.1.0 | ||
| shibuya==2026.7.12 | ||
|
mborland marked this conversation as resolved.
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.