- Enable Travis for your repository (note: you already have
.travis.yml
file) - Create GitHub access token; check
public_repo
onSelect scopes
section. - Use the token value as a value for Travis environment variable with the name
GH_TOKEN
- Make a test commit to trigger CI:
git commit --allow-empty -m "Test Travis CI" && git push
- Wait until Travis build is finished. You can check progress by clicking on the
Build Status
badge at the top - If you did everything correct, https://sketchings.github.io/blog-api/ will lead to your new docs
- [Optional] You can setup custom domain (just create
web/CNAME
file) - Start writing/editing your OpenAPI spec: check out usage section below
- [Optional] If you document public API consider adding it into APIs.guru directory using this form.
- Delete this section 😄
- Documentation(ReDoc): https://sketchings.github.io/blog-api/
- SwaggerUI: https://sketchings.github.io/blog-api/swagger-ui/
- Look full spec:
- Preview spec version for branch
[branch]
: https://sketchings.github.io/blog-api/preview/[branch]
Warning: All above links are updated only after Travis CI finishes deployment
- Install Node JS
- Clone repo and
cd
- Run
npm install
- Run
- Run
npm start
- Checkout console output to see where local server is started. You can use all links (except
preview
) by replacing https://sketchings.github.io/blog-api/ with url from the message:Server started <url>
- Make changes using your favorite editor or
swagger-editor
(look for URL in console output) - All changes are immediately propagated to your local server, moreover all documentation pages will be automagically refreshed in a browser after each change
TIP: you can open
swagger-editor
, documentation andswagger-ui
in parallel - Once you finish with the changes you can run tests using:
npm test
- Share you changes with the rest of the world by pushing to GitHub 😄