diff --git a/.github/workflows/prep-book-package.yml b/.github/workflows/prep-book-package.yml index 97d8c633..ef687e2a 100644 --- a/.github/workflows/prep-book-package.yml +++ b/.github/workflows/prep-book-package.yml @@ -20,12 +20,12 @@ jobs: - name: Copy env: SRC_FOLDER_PATH1: 'ipynb' - #SRC_FOLDER_PATH2: 'data' + SRC_FOLDER_PATH2: 'data' TARGET_BRANCH: 'geocompy' run: | git config --global --add safe.directory /__w/geocompy/geocompy files1=$(find $SRC_FOLDER_PATH1 -type f) # get the file list - #files2=$(find $SRC_FOLDER_PATH2 -type f) # get the file list + files2=$(find $SRC_FOLDER_PATH2 -type f) # get the file list git config --global user.name 'GitHub Action' git config --global user.email 'action@github.com' git add *.ipynb @@ -34,7 +34,8 @@ jobs: git fetch # fetch branches git checkout $TARGET_BRANCH # checkout to your branch git checkout ${GITHUB_REF##*/} -- $files1 # copy files from the source branch - #git checkout ${GITHUB_REF##*/} -- $files2 # copy files from the source branch + git mv ipynb/*.ipynb . # move files from ipynb to root + git checkout ${GITHUB_REF##*/} -- $files2 # copy files from the source branch git add -A git diff-index --quiet HEAD || git commit -am "deploy files" # commit to the repository (ignore if no modification) git push origin $TARGET_BRANCH # push to remote branch \ No newline at end of file diff --git a/convert.sh b/convert.sh index 553d5386..05f9dd92 100755 --- a/convert.sh +++ b/convert.sh @@ -15,6 +15,7 @@ done rm code/chapters/index.py rm code/chapters/preface.py rm code/chapters/README.py +rm ipynb/README.ipynb # Move files to correct folders mv *.py -v code/chapters