Skip to content

Commit

Permalink
Update publish-book.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
iamzoltan authored Jul 1, 2024
1 parent f04d6fe commit e8f02a9
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion .github/workflows/publish-book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ env:
NB_KERNEL: python
NMA_REPO: course-content
NMA_MAIN_BRANCH: main
CHATIFY: true
SOURCE_REPO: course-content
MOD_REPO: chatify-course-content

# This job installs dependencies, build the book, and pushes it to `gh-pages`
jobs:
Expand Down Expand Up @@ -43,6 +46,23 @@ jobs:
rm -r $BRANCH.tar.gz
echo ci/ >> .gitignore
- name: Install Chatify, Add to Notebooks, Commit Changes
if: env.CHATIFY == 'true'
run: |
pip install -r ci/chatify/requirements.txt
python ci/chatify/process_notebooks.py
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add '**/student/*.ipynb'
git diff-index --quiet HEAD || git commit -m "Add chatify to student tutorial notebooks"
- name: Push Chatify Changes to Main
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main
force: false

- name: Install dependencies
run: |
pip install -r requirements.txt
Expand Down Expand Up @@ -85,7 +105,7 @@ jobs:
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
ghp-import -n -c "compneuro.neuromatch.io" -m "Update course book" book/_build/html
ghp-import -n -c "chatify.compneuro.neuromatch.io" -m "Update course book" book/_build/html
git checkout -f gh-pages
- name: Publish to gh-pages
Expand Down

0 comments on commit e8f02a9

Please sign in to comment.