Skip to content

chore: simplify the api docs workflow#3186

Open
dougch wants to merge 7 commits into
aws:mainfrom
dougch:api_doc_update
Open

chore: simplify the api docs workflow#3186
dougch wants to merge 7 commits into
aws:mainfrom
dougch:api_doc_update

Conversation

@dougch

@dougch dougch commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Issues:

Resolves: none

Description of changes:

The doc.go tool requires being run from the util/ directory with explicit --config and --out flags. This makes the GitHub Pages workflow brittle and the tool unusable from the repo root.

as a reminder, the final doc URL: https://aws.github.io/aws-lc/api/headers.html

Changes:

  • doc.go auto-locates its config file via runtime.Caller(0) — no more CWD dependency
  • Add OutputDirectory field to doc.config so output path lives in config, not the CLI
  • Resolve BaseDirectory and OutputDirectory relative to config file location
  • Auto-create output directory
  • Fix doc.css copy path to be config-relative

Call-outs:

  • This workflow only triggers publish on push to main, but does a validation of comments on PRs.
  • workflow_dispatch can be used to test manually after merge
  • Backwards compatible: --config and --out flags still work as overrides

Testing:

Run locally: go run util/doc.go from repo root — generates docs in pages-output/, with the main entrypoint pages-output/headers.html.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

@codecov-commenter

codecov-commenter commented Apr 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.18%. Comparing base (3ab37a8) to head (b91b7be).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3186      +/-   ##
==========================================
- Coverage   78.19%   78.18%   -0.02%     
==========================================
  Files         695      695              
  Lines      124086   124086              
  Branches    17222    17232      +10     
==========================================
- Hits        97035    97020      -15     
- Misses      26129    26143      +14     
- Partials      922      923       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dougch dougch added the documentation Improvements or additions to documentation label Apr 27, 2026
@dougch
dougch temporarily deployed to auto-approve June 8, 2026 22:26 — with GitHub Actions Inactive
@dougch
dougch temporarily deployed to auto-approve June 8, 2026 22:26 — with GitHub Actions Inactive
@dougch
dougch temporarily deployed to auto-approve June 8, 2026 22:26 — with GitHub Actions Inactive
@dougch
dougch temporarily deployed to auto-approve June 8, 2026 22:26 — with GitHub Actions Inactive
@dougch
dougch temporarily deployed to auto-approve June 8, 2026 22:26 — with GitHub Actions Inactive
@dougch
dougch temporarily deployed to auto-approve June 8, 2026 22:26 — with GitHub Actions Inactive
@dougch
dougch temporarily deployed to auto-approve June 8, 2026 22:26 — with GitHub Actions Inactive
@dougch
dougch marked this pull request as ready for review June 8, 2026 22:35
@dougch
dougch requested a review from a team as a code owner June 8, 2026 22:35
Comment thread util/doc.go
Comment thread util/doc.go Outdated
Comment thread util/doc.go
Comment thread .github/workflows/api-docs.yml
Comment thread .github/workflows/api-docs.yml
Comment thread util/doc.go
Comment thread util/doc.go Outdated
justsmth
justsmth previously approved these changes Jul 15, 2026
@dougch
dougch enabled auto-merge (squash) July 16, 2026 21:12
@github-actions

Copy link
Copy Markdown
Contributor

🔒 Security ReviewView Report

Please review before merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants