File tree Expand file tree Collapse file tree 1 file changed +22
-4
lines changed
Expand file tree Collapse file tree 1 file changed +22
-4
lines changed Original file line number Diff line number Diff line change 6666 run : |
6767 git config --global user.name "github-actions[bot]"
6868 git config --global user.email "github-actions[bot]@users.noreply.github.com"
69- git fetch origin gh-pages || git checkout --orphan gh-pages
70- git switch gh-pages || git checkout -b gh-pages
69+ # Fetch gh-pages branch (create if missing)
70+ OUTPUT_FILE="01_quality_assessment/scRNA_QC.html"
71+
72+ git fetch origin gh-pages || true
73+ if git show-ref --verify --quiet refs/remotes/origin/gh-pages; then
74+ git checkout gh-pages
75+ git merge --strategy=ours origin/gh-pages
76+ else
77+ git checkout --orphan gh-pages
78+ fi
79+
80+ # Copy the HTML file into place (keep existing files)
81+ mkdir -p 01_quality_assessment
82+ cp "$OUTPUT_FILE" 01_quality_assessment/
83+
84+ # Commit only if changes exist
7185 git add 01_quality_assessment/scRNA_QC.html
72- git commit -m "Deploy scRNA_QC.html [skip ci]" || echo "No changes to commit"
73- git push origin gh-pages
86+ if git diff --cached --quiet; then
87+ echo "No changes to commit"
88+ else
89+ git commit -m "Deploy scRNA_QC.html [skip ci]"
90+ git push origin gh-pages
91+ fi
7492 shell : bash
You can’t perform that action at this time.
0 commit comments