Skip to content

Commit 2351202

Browse files
committed
chore: improve documentation deployment process by replacing rsync with cp and cleaning up unnecessary files
1 parent ef2b771 commit 2351202

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.github/workflows/update_docs.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ jobs:
5555
run: |
5656
source venv/bin/activate
5757
sh build_html.sh
58+
5859
- name: Deploy to pages branch
5960
run: |
6061
# Create and switch to a new worktree for the openmlsys-book-en branch
@@ -65,11 +66,12 @@ jobs:
6566
git fetch origin openmlsys-book-en || true
6667
git branch -D openmlsys-book-en || true
6768
git checkout --orphan openmlsys-book-en
68-
git rm -rf . || true
69+
70+
# Clean everything except .git directory
71+
find . -mindepth 1 -maxdepth 1 -not -name .git -exec rm -rf {} \;
6972
7073
# Copy built documentation
71-
apt-get update && apt-get install -y rsync
72-
rsync -av --delete ../_build/ .
74+
cp -r ../_build/* .
7375
7476
# Configure git
7577
git config user.name "${GIT_USER_NAME}"
@@ -90,3 +92,4 @@ jobs:
9092
# Clean up the worktree
9193
cd ..
9294
git worktree remove openmlsys-book-en
95+

0 commit comments

Comments
 (0)