.github/workflows/workflow.yaml
.
The workflow will sync the API on every push event on the master
branch. The workflow executes the job publish-api-doc
. This job
checks out the repository and uploads the API file openapi.yaml
to APITree.name: APITree
on:
push:
branches:
- master
jobs:
publish-api-doc:
name: Publish API documentation on APITree
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Upload API
uses: apitree/github-actions@master
env:
apitree_user_id: <APITREE_USER_ID>
apitree_api_nickname: <APITREE_API_NICKNAME>
apitree_api_file: openapi.yaml
apitree_token: ${{ secrets.APITREE_TOKEN }}
<APITREE_USER_ID>
<APITREE_USER_ID>
with your Account ID.
<APITREE_API_NICKNAME>
<APITREE_API_NICKNAME>
with a
nickname for the API of your choice. Allowed characters are: A-Z, a-z, 0-9, -, _
.
<APITREE_TOKEN>
api
, and click on Create.
API_TOKEN
and use the APITree API token
as value. Click on Add secret.