Skip to content

Commit

Permalink
Add github actions for readme and postman
Browse files Browse the repository at this point in the history
  • Loading branch information
joerideg committed Mar 27, 2024
1 parent 5591fac commit ff29d2d
Show file tree
Hide file tree
Showing 2 changed files with 98 additions and 7 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/postman.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Sync Postman Collection
on:
push:
branches:
- oas-readme-postman
jobs:
postman-sync:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Upload Autosuggest API to Postman Collection
uses: jumaevkova04/openapi2postman@main
with:
api-key: ${{ secrets.POSTMAN_API_KEY }}
workspace-id: ${{ secrets.POSTMAN_WORKSPACE_ID }}
collection-id: ${{ secrets.POSTMAN_AUTOSUGGEST_COLLECTION_ID }}
file: discovery/autosuggest.yaml

- name: Upload Bestseller API to Postman Collection
uses: jumaevkova04/openapi2postman@main
with:
api-key: ${{ secrets.POSTMAN_API_KEY }}
workspace-id: ${{ secrets.POSTMAN_WORKSPACE_ID }}
collection-id: ${{ secrets.POSTMAN_BESTSELLER_COLLECTION_ID }}
file: discovery/bestseller.yaml

- name: Upload Content Search API to Postman Collection
uses: jumaevkova04/openapi2postman@main
with:
api-key: ${{ secrets.POSTMAN_API_KEY }}
workspace-id: ${{ secrets.POSTMAN_WORKSPACE_ID }}
collection-id: ${{ secrets.POSTMAN_CONTENT_SEARCH_COLLECTION_ID }}
file: discovery/content-search.yaml

- name: Upload Recommendations & Pathways API to Postman Collection
uses: jumaevkova04/openapi2postman@main
with:
api-key: ${{ secrets.POSTMAN_API_KEY }}
workspace-id: ${{ secrets.POSTMAN_WORKSPACE_ID }}
collection-id: ${{ secrets.POSTMAN_RECS_PATHS_COLLECTION_ID }}
file: discovery/recommendations-pathways.yaml

- name: Upload Search & Category API to Postman Collection
uses: jumaevkova04/openapi2postman@main
with:
api-key: ${{ secrets.POSTMAN_API_KEY }}
workspace-id: ${{ secrets.POSTMAN_WORKSPACE_ID }}
collection-id: ${{ secrets.POSTMAN_SEARCH_CATEGORY_COLLECTION_ID }}
file: discovery/search-category.yaml

- name: Upload Email Widget API to Postman Collection
uses: jumaevkova04/openapi2postman@main
with:
api-key: ${{ secrets.POSTMAN_API_KEY }}
workspace-id: ${{ secrets.POSTMAN_WORKSPACE_ID }}
collection-id: ${{ secrets.POSTMAN_EMAIL_COLLECTION_ID }}
file: discovery/email_spec.yaml
46 changes: 39 additions & 7 deletions .github/workflows/readme.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,47 @@
# For info on getting the latest rdme version and obtaining your API_DEFINITION_ID,
# see our docs: https://docs.readme.com/docs/rdme#example-syncing-an-openapi-definition
name: Sync OAS to ReadMe
on:
push:
branches:
- main
- oas-readme-postman
jobs:
build:
rdme-openapi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: readmeio/[email protected]
- name: Checkout
uses: actions/checkout@v3

- name: Upload Autosuggest API to Readme
uses: readmeio/rdme@v8
with:
rdme: openapi discovery/email_spec.yaml --key=${{ secrets.API_KEY_SANDBOX }} --id=${{ secrets.EMAIL_RECS_ID }}
rdme:
openapi discovery/autosuggest.yaml --key=${{ secrets.API_KEY_SANDBOX }} --id=${{ secrets.AUTOSUGGEST_ID }}

- name: Upload Bestseller API to Readme
uses: readmeio/rdme@v8
with:
rdme:
openapi discovery/bestseller.yaml --key=${{ secrets.API_KEY_SANDBOX }} --id=${{ secrets.BESTSELLER_ID }}

- name: Upload Content Search API to Readme
uses: readmeio/rdme@v8
with:
rdme:
openapi discovery/content-search.yaml --key=${{ secrets.API_KEY_SANDBOX }} --id=${{ secrets.CONTENT_SEARCH_ID }}

- name: Upload Recommendations & Pathways API to Readme
uses: readmeio/rdme@v8
with:
rdme:
openapi discovery/recommendations-pathways.yaml --key=${{ secrets.API_KEY_SANDBOX }} --id=${{ secrets.RECS_PATHWAYS_ID }}

- name: Upload Search & Category API to Readme
uses: readmeio/rdme@v8
with:
rdme:
openapi discovery/search-category.yaml --key=${{ secrets.API_KEY_SANDBOX }} --id=${{ secrets.SEARCH_CATEGORY_ID }}

- name: Upload Email Widget API to Readme
uses: readmeio/rdme@v8
with:
rdme:
openapi discovery/email-spec.yaml --key=${{ secrets.API_KEY_SANDBOX }} --id=${{ secrets.EMAIL_RECS_ID }}

0 comments on commit ff29d2d

Please sign in to comment.