Skip to content

Commit ba6cabf

Browse files
committed
trying to trigger new rendering
1 parent 7c328b5 commit ba6cabf

File tree

7 files changed

+282
-1135
lines changed

7 files changed

+282
-1135
lines changed

.github/workflows/run_cellchat.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,22 @@ jobs:
9898
run: |
9999
git config --global user.name "github-actions[bot]"
100100
git config --global user.email "github-actions[bot]@users.noreply.github.com"
101-
git fetch origin gh-pages || git checkout --orphan gh-pages
102-
git switch gh-pages || git checkout -b gh-pages
103-
git add 05_signaling/cellchat.html
104-
git commit -m "Deploy cellchat.html [skip ci]" || echo "No changes to commit"
105-
git push origin gh-pages
101+
OUTPUT_FILE="05_signaling/cellchat.html"
102+
103+
# Fetch gh-pages (if exists) and create worktree
104+
git fetch origin gh-pages || true
105+
git worktree add /tmp/gh-pages gh-pages 2>/dev/null || git worktree add /tmp/gh-pages -b gh-pages
106+
107+
# Copy the file into the worktree
108+
mkdir -p "/tmp/gh-pages/$(dirname "$OUTPUT_FILE")"
109+
cp "$OUTPUT_FILE" "/tmp/gh-pages/$(dirname "$OUTPUT_FILE")/"
110+
111+
cd /tmp/gh-pages
112+
113+
# Commit and push if there are changes
114+
git add "$(dirname "$OUTPUT_FILE")/$(basename "$OUTPUT_FILE")"
115+
git commit -m "Deploy $(basename "$OUTPUT_FILE") [skip ci]"
116+
git push --force origin gh-pages
106117
shell: bash
107118

108119

0 commit comments

Comments
 (0)