2020-10-23 11:33:19 +03:00
|
|
|
name: publish-api-documentation
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ 3.0 ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-python@v2
|
2020-10-23 11:44:14 +03:00
|
|
|
with:
|
|
|
|
python-version: 3.6
|
2020-10-23 11:33:19 +03:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
|
|
|
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
2020-10-23 11:37:30 +03:00
|
|
|
- name: Install GNS3 server
|
|
|
|
run: |
|
|
|
|
python setup.py install
|
2020-10-23 11:33:19 +03:00
|
|
|
- name: Generate the API documentation
|
|
|
|
run: |
|
|
|
|
python3 ./scripts/publish_api_documentation.py
|
|
|
|
- name: Publish the API documentation
|
|
|
|
run: |
|
|
|
|
git config user.name github-actions
|
|
|
|
git config user.email github-actions@github.com
|
|
|
|
git commit -m "Publish API documentation"
|
|
|
|
git push
|