From b4d809c68157a09bbfd2381bcea04407bf3b3dd2 Mon Sep 17 00:00:00 2001 From: strawberry Date: Fri, 15 Nov 2024 09:49:54 -0500 Subject: [PATCH] add more checks for gh pages deployment workflow Signed-off-by: strawberry --- .github/workflows/documentation.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 506a87d9..ea720c43 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -39,7 +39,7 @@ concurrency: jobs: docs: name: Documentation and GitHub Pages - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 permissions: pages: write @@ -57,7 +57,7 @@ jobs: uses: actions/checkout@v4 - name: Setup GitHub Pages - if: github.event_name != 'pull_request' + if: (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') && (github.event_name != 'pull_request') && (github.event.pull_request.user.login == 'girlbossceo') uses: actions/configure-pages@v5 - uses: nixbuild/nix-quick-install-action@master @@ -139,12 +139,12 @@ jobs: compression-level: 0 - name: Upload generated documentation (book) as GitHub Pages artifact - if: github.event_name != 'pull_request' + if: (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') && (github.event_name != 'pull_request') && (github.event.pull_request.user.login == 'girlbossceo') uses: actions/upload-pages-artifact@v3 with: path: public - name: Deploy to GitHub Pages - if: github.event_name != 'pull_request' + if: (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') && (github.event_name != 'pull_request') && (github.event.pull_request.user.login == 'girlbossceo') id: deployment uses: actions/deploy-pages@v4