Skip to content

Commit 93e5f82

Browse files
authored
Merge pull request #1063 from kubeshop/copilot/fix-pages-deployment-error
Fix pages-build-deployment by disabling Jekyll on gh-pages
2 parents cb65ad6 + e6fab3f commit 93e5f82

File tree

2 files changed

+39
-2
lines changed

2 files changed

+39
-2
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: "[Fix] Add .nojekyll to gh-pages"
2+
on:
3+
workflow_dispatch:
4+
jobs:
5+
add-nojekyll:
6+
runs-on: ubuntu-latest
7+
name: Add .nojekyll to gh-pages
8+
permissions:
9+
contents: write
10+
steps:
11+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
12+
with:
13+
ref: "gh-pages"
14+
token: ${{ secrets.GITHUB_TOKEN }}
15+
- name: Add .nojekyll file
16+
run: |
17+
# Configure git
18+
git config --global user.name "testkube-cloud-ci-bot"
19+
git config --global user.email "testkube-cloud-ci-bot@users.noreply.github.com"
20+
21+
# Create .nojekyll to disable Jekyll processing if it doesn't exist
22+
if [ ! -f .nojekyll ]; then
23+
touch .nojekyll
24+
git add .nojekyll
25+
git commit -m "Add .nojekyll to disable Jekyll processing and fix pages-build-deployment error"
26+
git push origin gh-pages
27+
else
28+
echo ".nojekyll already exists, no action needed"
29+
fi

.github/workflows/index-update.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ jobs:
2727
# Configure git
2828
git config --global user.name "testkube-cloud-ci-bot"
2929
git config --global user.email "testkube-cloud-ci-bot@users.noreply.github.com"
30+
31+
# Create .nojekyll to disable Jekyll processing if it doesn't exist
32+
if [ ! -f .nojekyll ]; then
33+
touch .nojekyll
34+
fi
35+
3036
mkdir ./download
3137
3238
# Inputs
@@ -63,6 +69,8 @@ jobs:
6369
# Avoid overriding index branch when remote commit does not match our checkout commit
6470
current_commit_id=$(git rev-parse gh-pages)
6571

66-
# Push changes
67-
git add index.yaml && git commit -m "Update index.yaml"
72+
# Push changes (add .nojekyll only if it exists and was modified)
73+
git add index.yaml
74+
[ -f .nojekyll ] && git add .nojekyll || true
75+
git commit -m "Update index.yaml"
6876
git push origin gh-pages --force-with-lease=index:${current_commit_id}

0 commit comments

Comments
 (0)