From d8d7050cb8f956a3b185e57a7887739f0dfe2572 Mon Sep 17 00:00:00 2001 From: GarethCabournDavies Date: Fri, 7 Jun 2024 03:10:04 -0700 Subject: [PATCH 1/4] 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/4] 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/4] 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/4] 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: