Github action stable and dev documentations


I’d like to register my package JackPolynomials (and others). I have a Github action for the documentation:

    name: Documentation
    runs-on: ubuntu-latest
      - uses: actions/checkout@v2
      - uses: julia-actions/setup-julia@v1
          version: '1'
      - run: |
          julia --project=docs -e '
            using Pkg
      - run: |
          julia --project=docs -e '
            using Documenter: doctest
            using JackPolynomials
      - run: julia --project=docs docs/make.jl
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

This generates the documentation at How to generate the documentation for a stable release? I took a look at the Github repo of some registered packages but I can’t figure out.

If you add the TagBot (GitHub - JuliaRegistries/TagBot: Creates tags, releases, and changelogs for your Julia packages when they're registered) and make sure your docs action also runs on tags (see for example Manifolds.jl/documenter.yml at master · JuliaManifolds/Manifolds.jl · GitHub ), then this happens automatically each time you register a new version (that is when the TagBot creates a new Tag).

1 Like

Thank you, I will try that today I think.

Your documenter.yml file is very different of mine. In particular it does not include the line julia --project=docs docs/make.jl, and this is the command which generates the doc. How does this work? :thinking:

Magic! :magic_wand:

We both use the actions to checkout and setup Julia, but your manual steps are basically just the action GitHub - julia-actions/julia-docdeploy to which we pass the GitHub token and the documenter key (both used for deployment of the docs, but I am not 100% sure the documenter key is still needed).

Two other differences we have (but you can ignore):

  1. The docs: job only runs on master, tags or PRs, but for PRs only those where a certain tag is present (this way we do not built docs on arbitrary PRs where we do not change the docs)
  2. the note: job displays a note if the documentation is not run, to tell the first point to the user.

Basically, you can ignore our lines 12 and 23-29

Thanks. Now I’m trying to register with the Julia Registrator.

1 Like

Good luck, I love this bot, since it really makes registration easy (and I hope your compat-section is complete), if there are mistakes (like compat entries missing) you will get feedback on that as well.

Yes, nice bot.

I have a package dependent on LinearAlgebra but I looked on the Github repo of this package and it has no version. So what should I put in compat?

LinearAlgebra is a standard library and comes bundled with Julia. Setting a version restriction on this would not have any effect and should not be done.