This repository demonstrates how APIMatic's API can be used to keep API Documentation and SDKs updated via CI/CD.
The main.yml file contains a github workflow that updates the APIMatic portal when the respective API Specification is modified.
Generate an API KEY before proceeding.
Follow these steps to try out this workflow for yourself:
- Import an API into your APIMatic account.
- Get the API Entity ID for this newly imported API as described in APIMatic's documentation.
- Fork this repository.
- Create 2 new Github repository secrets in the forked repository:
- API_KEY to store your APIMatic API Key
- API_ENTITY_ID to store the API Entity ID you generated in step 2.
- In the "inplace-import" step of the /workflows/main.yml file, update the file name of your API Specification i.e 'file=@spec/'.
- Modify the API Specification stored in your repository and push your changes to the 'master' branch. This should trigger the CI/CD workflow. You can also manually trigger it via the 'Actions' tab in your repository.
- Generate a portal for the API that you imported in step 1 and preview the API Docs.
- The generated Portal should contain the changes you made to the API Specification.
**The steps above do not include Portal publishing. If you want to automate the publishing step as well, uncomment the last workflow step in the main.yml file. However, please note that the portal must be published manually at least once for the publish step in this workflow to run successfully.