From 1aa6fe8535185261d7786283c04560be7f6d8f0a Mon Sep 17 00:00:00 2001 From: grossmj Date: Fri, 23 Oct 2020 23:03:50 +1030 Subject: [PATCH] Add publish_api_documentation.yml to master branch for scheduled event to work. --- .../workflows/publish_api_documentation.yml | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/publish_api_documentation.yml diff --git a/.github/workflows/publish_api_documentation.yml b/.github/workflows/publish_api_documentation.yml new file mode 100644 index 00000000..199ea349 --- /dev/null +++ b/.github/workflows/publish_api_documentation.yml @@ -0,0 +1,41 @@ +name: publish-api-documentation + +on: + schedule: + - cron: "0 0 * * *" + push: + tags: + - v3.* + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + with: + ref: 3.0 + - uses: actions/setup-python@v2 + with: + python-version: 3.6 + - 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 config user.name github-actions + git config user.email github-actions@github.com + git checkout gh-pages + git add docs + git status + git commit -m "Publish API documentation" + git push