File tree Expand file tree Collapse file tree 2 files changed +39
-2
lines changed
Expand file tree Collapse file tree 2 files changed +39
-2
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 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
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}
You can’t perform that action at this time.
0 commit comments