File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed
Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -45,10 +45,20 @@ jobs:
4545 run : |
4646 git config --global user.name "github-actions[bot]"
4747 git config --global user.email "github-actions[bot]@users.noreply.github.com"
48- git checkout --orphan gh-pages
49- git rm -rf .
50- mv ./kv-color-palette/build/docs/dokkaHtml/* .
51- touch .nojekyll # Prevents GitHub from treating it as a Jekyll site
48+
49+ # Check if gh-pages exists
50+ if git ls-remote --exit-code --heads origin gh-pages; then
51+ git fetch origin gh-pages
52+ git checkout gh-pages
53+ git rm -rf .
54+ else
55+ git checkout --orphan gh-pages
56+ fi
57+
58+ # Move new documentation
59+ rsync -av --delete kv-color-palette/build/docs/dokkaHtml/ .
60+
61+ touch .nojekyll # Prevent GitHub from treating it as a Jekyll site
5262 git add .
53- git commit -m "Deploy Dokka documentation"
63+ git commit -m "Deploy Dokka documentation" || echo "No changes to commit"
5464 git push --force origin gh-pages
You can’t perform that action at this time.
0 commit comments