2020-10-23 08:33:19 +00:00
|
|
|
name: publish-api-documentation
|
|
|
|
|
|
|
|
on:
|
2020-10-23 10:33:28 +00:00
|
|
|
schedule:
|
|
|
|
- cron: "0 0 * * *"
|
2020-10-23 11:59:59 +00:00
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- v3.*
|
2020-10-23 08:33:19 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-python@v2
|
2020-10-23 08:44:14 +00:00
|
|
|
with:
|
|
|
|
python-version: 3.6
|
2020-10-23 08:33:19 +00: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 08:37:30 +00:00
|
|
|
- name: Install GNS3 server
|
|
|
|
run: |
|
|
|
|
python setup.py install
|
2020-10-23 08:33:19 +00:00
|
|
|
- name: Generate the API documentation
|
|
|
|
run: |
|
2020-10-23 08:47:31 +00:00
|
|
|
cd scripts
|
|
|
|
python3 publish_api_documentation.py
|
2020-10-23 08:33:19 +00:00
|
|
|
- name: Publish the API documentation
|
|
|
|
run: |
|
|
|
|
git config user.name github-actions
|
|
|
|
git config user.email github-actions@github.com
|
2020-10-23 12:18:50 +00:00
|
|
|
git checkout gh-pages
|
2020-10-23 08:51:50 +00:00
|
|
|
git add docs
|
|
|
|
git status
|
2020-10-23 08:33:19 +00:00
|
|
|
git commit -m "Publish API documentation"
|
|
|
|
git push
|