2020-10-23 12:33:50 +00:00
|
|
|
name: publish-api-documentation
|
|
|
|
|
|
|
|
on:
|
2020-10-24 02:38:10 +00:00
|
|
|
workflow_dispatch:
|
2020-10-23 12:33:50 +00:00
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- v3.*
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
2020-10-24 02:43:19 +00:00
|
|
|
fetch-depth: 0
|
2020-10-24 06:29:55 +00:00
|
|
|
ref: "gh-pages"
|
2020-10-23 12:33:50 +00:00
|
|
|
- uses: actions/setup-python@v2
|
|
|
|
with:
|
2022-03-28 00:57:53 +00:00
|
|
|
python-version: 3.7
|
2020-10-24 06:29:55 +00:00
|
|
|
- name: Merge changes from 3.0 branch
|
|
|
|
run: |
|
2020-10-24 06:34:42 +00:00
|
|
|
git config user.name github-actions
|
|
|
|
git config user.email github-actions@github.com
|
2020-10-24 06:32:44 +00:00
|
|
|
git merge origin/3.0 -X theirs
|
2020-10-23 12:33:50 +00:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
|
|
|
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
|
|
|
- name: Install GNS3 server
|
|
|
|
run: |
|
|
|
|
python setup.py install
|
|
|
|
- name: Generate the API documentation
|
|
|
|
run: |
|
|
|
|
cd scripts
|
|
|
|
python3 publish_api_documentation.py
|
|
|
|
- name: Publish the API documentation
|
|
|
|
run: |
|
|
|
|
git add docs
|
|
|
|
git status
|
|
|
|
git commit -m "Publish API documentation"
|
|
|
|
git push
|