Skip to content

Commit

Permalink
update book package
Browse files Browse the repository at this point in the history
  • Loading branch information
Nowosad committed Jan 5, 2024
1 parent 15690f0 commit 3cb9e77
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/prep-book-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ jobs:
env:
SRC_FOLDER_PATH1: 'ipynb'
SRC_FOLDER_PATH2: 'data'
SRC_FOLDER_PATH3: 'output'
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
files3=$(find $SRC_FOLDER_PATH3 -type f) # get the file list
git config --global user.name 'GitHub Action'
git config --global user.email '[email protected]'
git add *.ipynb
Expand All @@ -37,6 +39,7 @@ jobs:
git checkout ${GITHUB_REF##*/} -- $files1 # copy files from the source branch
git mv -f ipynb/*.ipynb . # move files from ipynb to root dir
git checkout ${GITHUB_REF##*/} -- $files2 # copy files from the source branch
git checkout ${GITHUB_REF##*/} -- $files3 # 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

0 comments on commit 3cb9e77

Please sign in to comment.