From fe74ad43f6ed6c05097d836c48395624ff5a2308 Mon Sep 17 00:00:00 2001 From: Luke Moll Date: Mon, 18 Mar 2024 21:40:36 +0000 Subject: [PATCH] Do checkout before fetch --- .github/workflows/webcheck.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/webcheck.yaml b/.github/workflows/webcheck.yaml index 48cbed8..5abd014 100644 --- a/.github/workflows/webcheck.yaml +++ b/.github/workflows/webcheck.yaml @@ -14,6 +14,13 @@ jobs: webcheck: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v4 + with: + # Only need the latest commit + fetch-depth: 1 + # And don't even need any files! + sparse-checkout: . + - name: Fetch website id: curl # If this step fails, likely some issue with DNS, HTTPS, or server not running. @@ -27,13 +34,6 @@ jobs: - name: Check index.html was written correctly run: stat index.html > /dev/null - - uses: actions/checkout@v4 - with: - # Only need the latest commit - fetch-depth: 1 - # And don't even need any files! - sparse-checkout: . - - name: Get Git SHA of HEAD run: git rev-parse main | sed -e 's/^/SHA=/;' >> $GITHUB_OUTPUT # git rev-parse main -- gets the full SHA1 of the most recent commit to 'main' branch