From 3f57f5285d5f57ff458f7b974fdc744e3f70b47c Mon Sep 17 00:00:00 2001 From: grossmj Date: Fri, 23 Oct 2020 22:48:50 +1030 Subject: [PATCH 01/10] Publish API documentation on gh-pages branch --- .github/workflows/publish_api_documentation.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish_api_documentation.yml b/.github/workflows/publish_api_documentation.yml index 21d9b986..e63a2adc 100644 --- a/.github/workflows/publish_api_documentation.yml +++ b/.github/workflows/publish_api_documentation.yml @@ -32,6 +32,7 @@ jobs: 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" From e568de0aa90dd99e204fd111b98703491d678956 Mon Sep 17 00:00:00 2001 From: grossmj Date: Fri, 23 Oct 2020 22:57:09 +1030 Subject: [PATCH 02/10] actions/checkout@v2 to checkout 3.0 branch. --- .github/workflows/publish_api_documentation.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/publish_api_documentation.yml b/.github/workflows/publish_api_documentation.yml index e63a2adc..5f714234 100644 --- a/.github/workflows/publish_api_documentation.yml +++ b/.github/workflows/publish_api_documentation.yml @@ -14,6 +14,8 @@ jobs: steps: - uses: actions/checkout@v2 + - with: + ref: 3.0 - uses: actions/setup-python@v2 with: python-version: 3.6 From 5bb6ba73f2c301fc6612d36f0e6f4efce2f3a1c1 Mon Sep 17 00:00:00 2001 From: grossmj Date: Fri, 23 Oct 2020 23:01:03 +1030 Subject: [PATCH 03/10] Fix syntax error in publish_api_documentation.yml --- .github/workflows/publish_api_documentation.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish_api_documentation.yml b/.github/workflows/publish_api_documentation.yml index 5f714234..199ea349 100644 --- a/.github/workflows/publish_api_documentation.yml +++ b/.github/workflows/publish_api_documentation.yml @@ -14,8 +14,8 @@ jobs: steps: - uses: actions/checkout@v2 - - with: - ref: 3.0 + with: + ref: 3.0 - uses: actions/setup-python@v2 with: python-version: 3.6 From 1aa6fe8535185261d7786283c04560be7f6d8f0a Mon Sep 17 00:00:00 2001 From: grossmj Date: Fri, 23 Oct 2020 23:03:50 +1030 Subject: [PATCH 04/10] 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 From 83fbd1f62705baa934cfd03964fde0d747ce6c32 Mon Sep 17 00:00:00 2001 From: grossmj Date: Sat, 24 Oct 2020 12:16:05 +1030 Subject: [PATCH 05/10] Fix GitHub Actions error: A branch or tag with the name '3' could not be found. --- .github/workflows/publish_api_documentation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish_api_documentation.yml b/.github/workflows/publish_api_documentation.yml index 199ea349..32663ec4 100644 --- a/.github/workflows/publish_api_documentation.yml +++ b/.github/workflows/publish_api_documentation.yml @@ -15,7 +15,7 @@ jobs: steps: - uses: actions/checkout@v2 with: - ref: 3.0 + ref: "3.0" - uses: actions/setup-python@v2 with: python-version: 3.6 From e6bf17185e1f7750c0650b9a8b4a40edac11219d Mon Sep 17 00:00:00 2001 From: grossmj Date: Sat, 24 Oct 2020 12:52:32 +1030 Subject: [PATCH 06/10] Manual trigger API documentation publishing using workflow_dispatch --- .github/workflows/publish_api_documentation.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/publish_api_documentation.yml b/.github/workflows/publish_api_documentation.yml index 199ea349..0e1d1a21 100644 --- a/.github/workflows/publish_api_documentation.yml +++ b/.github/workflows/publish_api_documentation.yml @@ -1,8 +1,7 @@ name: publish-api-documentation on: - schedule: - - cron: "0 0 * * *" + workflow_dispatch: push: tags: - v3.* @@ -14,8 +13,6 @@ jobs: steps: - uses: actions/checkout@v2 - with: - ref: 3.0 - uses: actions/setup-python@v2 with: python-version: 3.6 From d063b3e39d23268b4dc0c57990c571fe95ea7a15 Mon Sep 17 00:00:00 2001 From: grossmj Date: Sat, 24 Oct 2020 13:08:10 +1030 Subject: [PATCH 07/10] Manual trigger API documentation publishing using workflow_dispatch --- .github/workflows/publish_api_documentation.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish_api_documentation.yml b/.github/workflows/publish_api_documentation.yml index 32663ec4..8867170f 100644 --- a/.github/workflows/publish_api_documentation.yml +++ b/.github/workflows/publish_api_documentation.yml @@ -1,6 +1,7 @@ name: publish-api-documentation on: + workflow_dispatch: schedule: - cron: "0 0 * * *" push: From fb8df1cc6beb0ae017007896b9822c1108d72c37 Mon Sep 17 00:00:00 2001 From: grossmj Date: Sat, 24 Oct 2020 13:13:19 +1030 Subject: [PATCH 08/10] Fetch all history for all tags and branches in publish_api_documentation.yml --- .github/workflows/publish_api_documentation.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish_api_documentation.yml b/.github/workflows/publish_api_documentation.yml index 8867170f..46c09875 100644 --- a/.github/workflows/publish_api_documentation.yml +++ b/.github/workflows/publish_api_documentation.yml @@ -16,6 +16,7 @@ jobs: steps: - uses: actions/checkout@v2 with: + fetch-depth: 0 ref: "3.0" - uses: actions/setup-python@v2 with: From d2b7c9bcbf4f1484248cc672036811845eeef63b Mon Sep 17 00:00:00 2001 From: grossmj Date: Sat, 24 Oct 2020 13:38:32 +1030 Subject: [PATCH 09/10] Do not build API documentation on schedule. --- .github/workflows/publish_api_documentation.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/publish_api_documentation.yml b/.github/workflows/publish_api_documentation.yml index 46c09875..59289038 100644 --- a/.github/workflows/publish_api_documentation.yml +++ b/.github/workflows/publish_api_documentation.yml @@ -2,8 +2,6 @@ name: publish-api-documentation on: workflow_dispatch: - schedule: - - cron: "0 0 * * *" push: tags: - v3.* From 163a867f00a51691db62df34e80753a11d52e389 Mon Sep 17 00:00:00 2001 From: grossmj Date: Sat, 24 Oct 2020 15:24:32 +1030 Subject: [PATCH 10/10] Only automatically build API documentation for 3.0 branch and v3.* tags --- .github/workflows/publish_api_documentation.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/publish_api_documentation.yml b/.github/workflows/publish_api_documentation.yml index 59289038..d20e5f49 100644 --- a/.github/workflows/publish_api_documentation.yml +++ b/.github/workflows/publish_api_documentation.yml @@ -3,6 +3,8 @@ name: publish-api-documentation on: workflow_dispatch: push: + branches: + - 3.0 tags: - v3.*