Hejsil / zig-clap

Command line argument parsing library
MIT License
939 stars 67 forks source link

Add autodoc website #113

Closed abhinav closed 10 months ago

abhinav commented 10 months ago

If this is not something you'd like for clap to provide, feel free to close the PR--it didn't require a lot of effort.

A preview of the output is available at https://abhinav.github.io/zig-clap/.


This adds a zig build docs step that builds the documentation website and writes it to zig-out/docs.

It further includes a GitHub Workflow that publishes this website to GitHub Pages. The GitHub Workflow is divided into two jobs:

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

This workflow runs on two events:

The instructions to do this came from the following sources:


Important pre-merge steps:

If this PR is accepted, the following steps should be taken before merging the PR:

  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
  4. Merge the PR.

If the steps are missed, the PR will merge just fine, but the docs job will fail immediately on merge. This can be remedied by following steps 1-3 above, and either adding a new commit on master, or manually firing the workflow from the Actions > API Reference page.

Hejsil commented 10 months ago

Love it! I'll do the pre-merge steps and merge some time after Christmas :+1:

Hejsil commented 10 months ago

Looking good :+1: https://Hejsil.github.io/zig-clap