Skip to content

Commit 2a87757

Browse files
fix: try to fix ref/head issue with raw files
1 parent 77652ab commit 2a87757

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

.github/workflows/release-with-version.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ jobs:
154154
155155
- name: Wait for tag propagation
156156
run: |
157-
echo "Waiting for tag to propagate..."
157+
echo "Waiting for tag to propagation..."
158158
sleep 10
159159
160160
- name: Create GitHub Release
@@ -169,11 +169,24 @@ jobs:
169169
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
170170
git fetch origin
171171
if git show-ref --quiet refs/remotes/origin/gh-pages; then
172+
# Simple approach: checkout gh-pages, add docs, commit, push
172173
git checkout gh-pages
173-
git checkout ${{ env.NEW_TAG }} -- docs
174-
git add docs
175-
git commit -m "Copy docs from ${{ env.NEW_TAG }}"
176-
git push origin gh-pages
174+
175+
# Copy docs from the working directory (they should still be there)
176+
if [ -d "docs" ]; then
177+
cp -r docs/* . 2>/dev/null || echo "No docs to copy"
178+
git add .
179+
180+
if [ -n "$(git status --porcelain)" ]; then
181+
git commit -m "Copy docs from ${{ env.NEW_TAG }}"
182+
git push origin gh-pages
183+
else
184+
echo "No changes to deploy"
185+
fi
186+
fi
187+
188+
# Return to main
189+
git checkout main
177190
else
178191
echo "gh-pages branch doesn't exist, skipping docs deployment"
179192
fi

0 commit comments

Comments
 (0)