Hosting on GitHub

    • Add and commit everything:

    • Add the remote: (Be sure to replace <YOUR-GITHUB-USERNAME> and <YOUR-REPOSITORY-NAME> accordingly)

      Note

      If you like, feel free to replace public with , or a remote name of your choosing.

    • Push it:

    It’s good practice to do GitHub Releases.

    Start by navigating to your repository’s releases page. This can be found at https://github.com/<YOUR-GITHUB-NAME>/<YOUR-REPOSITORY-NAME>/releases

    Click “Create a new release”.

    According to the Crystal Shards README,

    Accordingly, in the input that says tag version, type . Make sure this matches the version in shard.yml. Title it v0.1.0 and write a short description for the release.

    Click “Publish release” and you’re done!

    Follow and create a new release every time your push new code to master.

    Continuous integration

    GitHub Actions allows you to automatically test your project on every commit. Configure it according to the .

    You can also add a build status badge below the description in your README.md.

    As an extension of the GitHub Actions config, you can add the steps to build the API doc site and then upload them, correspondingly:

    -- where the latter ... placeholder is any of the generic GitHub Actions to push a directory to the gh-pages branch. Some options are:

    This uses Crystal’s built-in API doc generator to make a generic site based on your code and comments to the items in it.

    For one of the options for static site generation, , there’s a solution to tightly integrate API documentation into an overall documentation site: mkdocstrings-crystal. Consider it as an alternative to .