Skip to content

Integrate with Github Actions to automatically sync Swagger or OpenAPI file whenever changes occur in GitHub repo.

Notifications You must be signed in to change notification settings

easonyang09/sygna-bridge-developers-doc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Automatically Sync API Specification with GitHub

With GitHub Actions it's super easy to automatically sync your Swagger or OpenAPI file whenever changes occur in your GitHub repo!

Just copy and paste the following into .github/workflows/readme-github-sync.yml. You only need to modify three of the parameters in the GitHub Action--the path to your API file, your ReadMe project's API key, and the ReadMe version you want to upload to. The other two parameters, repo-token and readme-api-id, should just be copied from these docs!

Once that is done you should be good to go! Any subsequent commits to master will automatically start the sync process and sync your specified file to ReadMe.

name: Sync to ReadMe

on: [push]

jobs:
  build:

    runs-on: ubuntu-latest
    
    steps:
    - uses: readmeio/[email protected]
      with:
        repo-token: '${{ secrets.GITHUB_TOKEN }}' # DON'T MODIFY--Allows us to get the contents of your spec file
        readme-api-id: 'awNKtL2U2c3a' # DON'T MODIFY--Autogenerated to match API Settings in ReadMe to synced file!
        api-file-path: 'PATH-TO-FILE.json' # path to API spec file
        readme-api-key: 'ReadMe API Key' # ReadMe API key 
        readme-api-version: 'README-VERSION' # ReadMe version to sync to

About

Integrate with Github Actions to automatically sync Swagger or OpenAPI file whenever changes occur in GitHub repo.

Resources

Stars

Watchers

Forks

Packages

No packages published