XMLCoder icon indicating copy to clipboard operation
XMLCoder copied to clipboard

Generate and publish API docs on CI

Open MaxDesiatov opened this issue 5 years ago • 1 comments

XMLCoder should have publicly visible docs for its API. First option to consider for auto-generated docs is Jazzy. Generated docs could be published with GitHub Pages.

MaxDesiatov avatar Dec 14 '18 10:12 MaxDesiatov

It looks like Jazzy doesn't support generation of docs for multiple versions of the library. This means we'd need to upload docs to a correct url within the xmlcoder.org S3 bucket. I propose checking TRAVIS_BRANCH and TRAVIS_TAG environment variables in .travis.yml during a CI build. When TRAVIS_BRANCH is master, jazzy output should be uploaded to xmlcoder.org/docs/master path. For any other branch jazzy should still run to make sure that docs generation is not broken, but I don't think it's worth uploading docs for every PR and branch. Also, if TRAVIS_TAG has a value, an upload to xmlcoder.org/docs/$TRAVIS_TAG should occur.

After this works we could keep a predefined or somehow generated automatically file at xmlcoder.org/index.html to either redirect to the latest stable docs version or show a landing page with a correct link to the docs.

MaxDesiatov avatar Dec 18 '18 13:12 MaxDesiatov