Skip to content

Commit

Permalink
updates my workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Nowosad committed Jan 4, 2024
1 parent 1774e95 commit e39f878
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/prep-book-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 '[email protected]'
git add *.ipynb
Expand All @@ -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
1 change: 1 addition & 0 deletions convert.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e39f878

Please sign in to comment.