Skip to content

Commit

Permalink
Do checkout before fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeMoll committed Mar 18, 2024
1 parent f73f2a8 commit fe74ad4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/webcheck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down

0 comments on commit fe74ad4

Please sign in to comment.