ga4gh / gh-openapi-docs

Package for building OpenAPI schema docs and UI for gh-pages
Apache License 2.0
7 stars 5 forks source link

Add documentation (template?) for GitHub CI/CD workflow #47

Open tschaffter opened 3 years ago

tschaffter commented 3 years ago

Similar to #4 but for GitHub CI/CD workflow

A work in progress implementation is available in this PR: https://github.com/data2health/nlp-sandbox-schemas/pull/7

tschaffter commented 3 years ago

@jaeddy @jb-adams Here is a working example that I created for a repository that hosts multiple OpenAPI specifications: https://github.com/Sage-Bionetworks/nlp-sandbox-schemas/blob/develop/.github/workflows/ci.yml

Additional information are available here: https://github.com/Sage-Bionetworks/nlp-sandbox-schemas/issues/30

jb-adams commented 3 years ago

Thanks @tschaffter !

Similar to #64 , I'd prefer to put this logic into the app itself to avoid replicating build/push logic across .travis.yml files for different GA4GH specs. I've started a feature branch to do this. In particular, the files gh-pages.js and git-config.js are handling similar logic as to what's in your ci.yml file.

I'm able to build, commit, and push to gh-pages all from a docker container running the app. Here is the repo containing a dummy "Hello World" API spec, that, when updated and pushed, triggers a push to gh-pages