From d8d7050cb8f956a3b185e57a7887739f0dfe2572 Mon Sep 17 00:00:00 2001 From: GarethCabournDavies Date: Fri, 7 Jun 2024 03:10:04 -0700 Subject: [PATCH 1/9] Draft to start pushing tags to permanently-kept documentation pages --- .github/workflows/basic-tests.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/basic-tests.yml b/.github/workflows/basic-tests.yml index d962026e09a..523d1fe3cfb 100644 --- a/.github/workflows/basic-tests.yml +++ b/.github/workflows/basic-tests.yml @@ -75,3 +75,23 @@ jobs: BRANCH: gh-pages FOLDER: _gh-pages SINGLE_COMMIT: true + deploy_documentation_release: + runs-on: ubuntu-latest + needs: build + if: github.ref == 'refs/head/master' && github.event_name == 'release' + steps: + - name: retrieve built documentation + uses: actions/download-artifact@v2 + with: + name: documentation-page + - name: debug + run: | + mkdir _gh-pages + mv latest _gh-pages/${GITHUB_REF#refs/tags/} + - name: deploying tag ${GITHUB_REF#refs/tags/} to gh-pages + uses: JamesIves/github-pages-deploy-action@3.7.1 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH: gh-pages + FOLDER: _gh-pages + SINGLE_COMMIT: true From ee9c130e51d7c6be5973a8698337ac5facaf1de7 Mon Sep 17 00:00:00 2001 From: GarethCabournDavies Date: Tue, 23 Jul 2024 03:58:07 -0700 Subject: [PATCH 2/9] De-duplicate code --- .github/workflows/basic-tests.yml | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/.github/workflows/basic-tests.yml b/.github/workflows/basic-tests.yml index 523d1fe3cfb..b8bcad3bf3a 100644 --- a/.github/workflows/basic-tests.yml +++ b/.github/workflows/basic-tests.yml @@ -58,7 +58,8 @@ jobs: deploy_documentation: runs-on: ubuntu-latest needs: build - if: github.ref == 'refs/heads/master' && github.event_name == 'push' + if: github.ref == 'refs/heads/master' && (github.event_name == 'push' || github.event_name == 'release') + if: [ github.event_name == 'release']; then page=${GITHUB_REF#refs/tags/}; else page=current; fi steps: - name: retrieve built documentation uses: actions/download-artifact@v2 @@ -66,29 +67,9 @@ jobs: name: documentation-page - name: debug run: | - mkdir _gh-pages - mv latest _gh-pages - - name: deploying to gh-pages - uses: JamesIves/github-pages-deploy-action@3.7.1 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BRANCH: gh-pages - FOLDER: _gh-pages - SINGLE_COMMIT: true - deploy_documentation_release: - runs-on: ubuntu-latest - needs: build - if: github.ref == 'refs/head/master' && github.event_name == 'release' - steps: - - name: retrieve built documentation - uses: actions/download-artifact@v2 - with: - name: documentation-page - - name: debug - run: | - mkdir _gh-pages - mv latest _gh-pages/${GITHUB_REF#refs/tags/} - - name: deploying tag ${GITHUB_REF#refs/tags/} to gh-pages + mkdir _gh-pages/$page + mv latest _gh-pages/$page + - name: deploying $page to gh-pages uses: JamesIves/github-pages-deploy-action@3.7.1 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 5ea48e39831339db6c244d8a772ff84be86173e2 Mon Sep 17 00:00:00 2001 From: GarethCabournDavies Date: Tue, 23 Jul 2024 04:02:22 -0700 Subject: [PATCH 3/9] minor fix --- .github/workflows/basic-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basic-tests.yml b/.github/workflows/basic-tests.yml index b8bcad3bf3a..04234a47f0f 100644 --- a/.github/workflows/basic-tests.yml +++ b/.github/workflows/basic-tests.yml @@ -59,7 +59,7 @@ jobs: runs-on: ubuntu-latest needs: build if: github.ref == 'refs/heads/master' && (github.event_name == 'push' || github.event_name == 'release') - if: [ github.event_name == 'release']; then page=${GITHUB_REF#refs/tags/}; else page=current; fi + script: [ github.event_name == 'release']; then page=${GITHUB_REF#refs/tags/}; else page=current; fi steps: - name: retrieve built documentation uses: actions/download-artifact@v2 From 57ee394529aa1f61a7c4a526eadfcda3e80d7af8 Mon Sep 17 00:00:00 2001 From: GarethCabournDavies Date: Tue, 23 Jul 2024 05:17:45 -0700 Subject: [PATCH 4/9] Try this --- .github/workflows/basic-tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/basic-tests.yml b/.github/workflows/basic-tests.yml index 04234a47f0f..c8747f9e6af 100644 --- a/.github/workflows/basic-tests.yml +++ b/.github/workflows/basic-tests.yml @@ -59,7 +59,6 @@ jobs: runs-on: ubuntu-latest needs: build if: github.ref == 'refs/heads/master' && (github.event_name == 'push' || github.event_name == 'release') - script: [ github.event_name == 'release']; then page=${GITHUB_REF#refs/tags/}; else page=current; fi steps: - name: retrieve built documentation uses: actions/download-artifact@v2 @@ -67,8 +66,9 @@ jobs: name: documentation-page - name: debug run: | - mkdir _gh-pages/$page - mv latest _gh-pages/$page + if [ github.event_name == 'release']; then ENV_PAGE=${GITHUB_REF#refs/tags/}; else ENV_PAGE=current; fi + mkdir _gh-pages/$ENV_PAGE + mv latest _gh-pages/$ENV_PAGE - name: deploying $page to gh-pages uses: JamesIves/github-pages-deploy-action@3.7.1 with: From 72c6ad527cebb0b9c7e03a747ca89759b71b082e Mon Sep 17 00:00:00 2001 From: Gareth S Cabourn Davies Date: Wed, 24 Jul 2024 09:36:03 +0100 Subject: [PATCH 5/9] Update basic-tests.yml --- .github/workflows/basic-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basic-tests.yml b/.github/workflows/basic-tests.yml index c8747f9e6af..8ee0e755008 100644 --- a/.github/workflows/basic-tests.yml +++ b/.github/workflows/basic-tests.yml @@ -67,7 +67,7 @@ jobs: - name: debug run: | if [ github.event_name == 'release']; then ENV_PAGE=${GITHUB_REF#refs/tags/}; else ENV_PAGE=current; fi - mkdir _gh-pages/$ENV_PAGE + mkdir -p _gh-pages/$ENV_PAGE mv latest _gh-pages/$ENV_PAGE - name: deploying $page to gh-pages uses: JamesIves/github-pages-deploy-action@3.7.1 From 9ec2e137b91d1db6d9e93939fe9a468625df0a24 Mon Sep 17 00:00:00 2001 From: GarethCabournDavies Date: Wed, 24 Jul 2024 02:31:16 -0700 Subject: [PATCH 6/9] Better naming of the docs folders --- .github/workflows/basic-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/basic-tests.yml b/.github/workflows/basic-tests.yml index 8ee0e755008..b2a5dd0a65b 100644 --- a/.github/workflows/basic-tests.yml +++ b/.github/workflows/basic-tests.yml @@ -66,8 +66,8 @@ jobs: name: documentation-page - name: debug run: | - if [ github.event_name == 'release']; then ENV_PAGE=${GITHUB_REF#refs/tags/}; else ENV_PAGE=current; fi - mkdir -p _gh-pages/$ENV_PAGE + if [ github.event_name == 'release']; then ENV_PAGE=${GITHUB_REF#refs/tags/}; else ENV_PAGE=latest; fi + mkdir _gh-pages mv latest _gh-pages/$ENV_PAGE - name: deploying $page to gh-pages uses: JamesIves/github-pages-deploy-action@3.7.1 From 28dfe67f392791cfb4b29c62877cf45d5b9a0b6e Mon Sep 17 00:00:00 2001 From: GarethCabournDavies Date: Wed, 24 Jul 2024 07:00:49 -0700 Subject: [PATCH 7/9] test --- .github/workflows/basic-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/basic-tests.yml b/.github/workflows/basic-tests.yml index b2a5dd0a65b..fa8ddbea9bd 100644 --- a/.github/workflows/basic-tests.yml +++ b/.github/workflows/basic-tests.yml @@ -66,10 +66,10 @@ jobs: name: documentation-page - name: debug run: | - if [ github.event_name == 'release']; then ENV_PAGE=${GITHUB_REF#refs/tags/}; else ENV_PAGE=latest; fi + if [ github.event_name == 'release']; then ENV_PAGE=${GITHUB_REF#refs/tags/}; else ENV_PAGE=current; fi mkdir _gh-pages mv latest _gh-pages/$ENV_PAGE - - name: deploying $page to gh-pages + - name: deploying to gh-pages uses: JamesIves/github-pages-deploy-action@3.7.1 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 864f62ebd4155f0fe6c59e6125a241197c9bfac4 Mon Sep 17 00:00:00 2001 From: GarethCabournDavies Date: Wed, 24 Jul 2024 07:14:09 -0700 Subject: [PATCH 8/9] single-commit deletes everything! --- .github/workflows/basic-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basic-tests.yml b/.github/workflows/basic-tests.yml index fa8ddbea9bd..c21d3f18ccc 100644 --- a/.github/workflows/basic-tests.yml +++ b/.github/workflows/basic-tests.yml @@ -75,4 +75,4 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} BRANCH: gh-pages FOLDER: _gh-pages - SINGLE_COMMIT: true + From 850ce40db7ba950720a545514364d200423fc57f Mon Sep 17 00:00:00 2001 From: Gareth S Cabourn Davies Date: Fri, 17 Jan 2025 12:01:51 +0000 Subject: [PATCH 9/9] Update .github/workflows/basic-tests.yml --- .github/workflows/basic-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basic-tests.yml b/.github/workflows/basic-tests.yml index c21d3f18ccc..cc990dbc4e2 100644 --- a/.github/workflows/basic-tests.yml +++ b/.github/workflows/basic-tests.yml @@ -66,7 +66,7 @@ jobs: name: documentation-page - name: debug run: | - if [ github.event_name == 'release']; then ENV_PAGE=${GITHUB_REF#refs/tags/}; else ENV_PAGE=current; fi + if [ github.event_name == 'release']; then ENV_PAGE=${GITHUB_REF#refs/tags/}; else ENV_PAGE=latest; fi mkdir _gh-pages mv latest _gh-pages/$ENV_PAGE - name: deploying to gh-pages