Skip to content

Commit 9226477

Browse files
authored
Merge pull request #37 from endlessm/fail-if-pages-not-enabled
Fail if GitHub Pages is not correctly configured
2 parents 7b4c7db + 15676d0 commit 9226477

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

action.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,18 @@ inputs:
1010
runs:
1111
using: composite
1212
steps:
13+
- name: Check that GitHub Pages is correctly configured
14+
env:
15+
GH_TOKEN: ${{ github.token }}
16+
shell: bash
17+
run: |
18+
if ! gh api "repos/${{ github.repository }}/pages" | jq --exit-status '.build_type == "workflow"'
19+
then
20+
echo -n "Check that Pages is enabled, with the source set to GitHub Actions, in the " >> "$GITHUB_STEP_SUMMARY"
21+
echo "[repository settings](https://github.com/${{ github.repository }}/settings/pages)." >> "$GITHUB_STEP_SUMMARY"
22+
exit 1
23+
fi
24+
1325
- uses: astral-sh/setup-uv@v6
1426
with:
1527
cache-dependency-glob: |

0 commit comments

Comments
 (0)