@@ -41,30 +41,33 @@ jobs:
4141 - name : Generate Dokka Documentation
4242 run : ./gradlew dokkaHtml
4343
44- - name : Deploy to gh-pages
44+ - name : Zip Generated Documentation
45+ run : zip -r kv-color-palette-dokka.zip kv-color-palette/build/docs/dokkaHtml
46+
47+ - name : Remove all files except documentation
4548 run : |
46- git config --global user.name "github-actions[bot]"
47- git config --global user.email "github-actions[bot]@users.noreply.github.com"
49+ shopt -s extglob
50+ rm -rf !(kv-color-palette-dokka.zip|.git)
51+ ls -la
52+
53+ # - name: Deploy to gh-pages
54+ # run: |
55+ # git config --global user.name "github-actions[bot]"
56+ # git config --global user.email "github-actions[bot]@users.noreply.github.com"
4857
4958 # 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- # Ensure the build folder exists
59- if [ ! -d "kv-color-palette/build/docs/dokkaHtml" ]; then
60- echo "Dokka documentation not found!"
61- exit 1
62- fi
59+ # if git ls-remote --exit-code --heads origin gh-pages; then
60+ # git fetch origin gh-pages
61+ # git checkout gh-pages
62+ # git rm -rf .
63+ # else
64+ # git checkout --orphan gh-pages
65+ # fi
6366
6467 # Sync documentation (ignore harmless vanishing file warnings)
65- rsync -av --delete kv-color-palette/build/docs/dokkaHtml/ . || true
68+ # rsync -av --delete kv-color-palette/build/docs/dokkaHtml/ . || true
6669
67- touch .nojekyll # Prevent GitHub from treating it as a Jekyll site
68- git add .
69- git commit -m "Deploy Dokka documentation" || echo "No changes to commit"
70- git push --force origin gh-pages
70+ # touch .nojekyll # Prevent GitHub from treating it as a Jekyll site
71+ # git add .
72+ # git commit -m "Deploy Dokka documentation" || echo "No changes to commit"
73+ # git push --force origin gh-pages
0 commit comments