ziglibs / ansi-term

Zig library for dealing with ANSI terminals
MIT License
68 stars 7 forks source link

Add "docs" build and CI step #20

Closed abhinav closed 1 year ago

abhinav commented 1 year ago

Preview: A preview of the result of this PR is available at https://abhinav.github.io/ansi-term/


Adds a zig build docs step to build documentation website, and a new GitHub Workflow that publishes the website to GitHub Pages.

This workflow is divided into two jobs:

These are separate jobs to minimize permissions available to the build job.

To use this, you have to take the following steps:

  1. Go to Settings for the repository
  2. Select Pages on the left under Code and automation
  3. Under Build and deployment set Source to GitHub Actions

Note that this workflow dispatches on two events:

The workflow itself is a separate workflow to make it more copy-paste friendly.

Note on stability: One of the points made by @joachimschmidt557 in #13 was that the generated docs must explicitly call out that the documentation is unstable/WIP.

Because this uses the same tooling as Zig std, the generated pages include the following header at the top:

This is a beta autodoc build; expect bugs and missing information.

Resolves #13

abhinav commented 1 year ago

Note that this will not pass until #19 is merged. The build is currently broken with latest Zig nightly.

joachimschmidt557 commented 1 year ago

Thanks a lot!