Skip to main content

Configuring your GitHub Repository

To update your API Portal for every change to your OAS and markdown files, you need to configure your GitHub repository to revalidate the portal on every push.

GitHub Action

In the same repository that holds your konfig.yaml file(s), add the following GitHub Action under .github/workflows/konfig-revalidate-portal.yaml to the repository that hosts your OAS. Replace the following values with your own:

  1. Production Branch
  2. Owner
  3. Repository
.github/workflows/konfig-revalidate-portal.yaml

_23
name: konfig-revalidate-portal
_23
on:
_23
push:
_23
branches:
_23
- main
_23
jobs:
_23
konfig-revalidate-portal:
_23
runs-on: ubuntu-latest
_23
env:
_23
CLI_VERSION: 1.10.0
_23
steps:
_23
- uses: actions/checkout@v3
_23
- name: Cache node_modules
_23
id: cache-npm
_23
uses: actions/cache@v3
_23
with:
_23
# npm cache files are stored in "~/.npm" on Linux/macOS
_23
path: ~/.npm
_23
key: ${{ runner.os }}-build-${{ env.CLI_VERSION }}
_23
- name: Install Konfig CLI
_23
run: npm install -g konfig-cli@$CLI_VERSION
_23
- name: Revalidate Portal
_23
run: konfig revalidate-portal -o konfig -r konfig-sdks