|
8 | 8 | NB_KERNEL: python |
9 | 9 | NMA_REPO: course-content-dl |
10 | 10 | NMA_MAIN_BRANCH: main |
| 11 | + CHATIFY: true |
| 12 | + SOURCE_REPO: course-content-dl |
| 13 | + MOD_REPO: chatify-course-content-dl |
11 | 14 |
|
12 | 15 | # This job installs dependencies, build the book, and pushes it to `gh-pages` |
13 | 16 | jobs: |
|
57 | 60 | rm -r nmaci-$BRANCH |
58 | 61 | rm -r $BRANCH.tar.gz |
59 | 62 | echo ci/ >> .gitignore |
| 63 | + |
| 64 | + - name: Install Chatify, Add to Notebooks, Commit Changes |
| 65 | + if: env.CHATIFY == 'true' |
| 66 | + run: | |
| 67 | + pip install -r ci/chatify/requirements.txt |
| 68 | + python ci/chatify/process_notebooks.py |
| 69 | + git config --local user.email "[email protected]" |
| 70 | + git config --local user.name "GitHub Action" |
| 71 | + git add '**/student/*.ipynb' |
| 72 | + git diff-index --quiet HEAD || git commit -m "Add chatify to student tutorial notebooks" |
| 73 | +
|
| 74 | + - name: Push Chatify Changes to Main |
| 75 | + if: env.CHATIFY == 'true' |
| 76 | + |
| 77 | + with: |
| 78 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 79 | + branch: main |
| 80 | + force: false |
60 | 81 |
|
61 | 82 | - name: Install dependencies |
62 | 83 | run: | |
|
85 | 106 | - name: Build the book |
86 | 107 | run: | |
87 | 108 | python ci/generate_book_dl.py student |
88 | | - jupyter-book toc migrate /home/runner/work/course-content-dl/course-content-dl/book/_toc.yml -o /home/runner/work/course-content-dl/course-content-dl/book/_toc.yml |
| 109 | + jupyter-book toc migrate /home/runner/work/chatify-course-content-dl/chatify-course-content-dl/book/_toc.yml -o /home/runner/work/chatify-course-content-dl/chatify-course-content-dl/book/_toc.yml |
89 | 110 | ln -s ../tutorials book/tutorials |
90 | 111 | ln -s ../projects book/projects |
91 | 112 | ln -s ../prereqs book/prereqs |
|
96 | 117 | run: | |
97 | 118 | git config --local user.email "[email protected]" |
98 | 119 | git config --local user.name "GitHub Action" |
99 | | - ghp-import -n -c "deeplearning.neuromatch.io" -m "Update course book" book/_build/html |
| 120 | + ghp-import -n -c "chatify.deeplearning.neuromatch.io" -m "Update course book" book/_build/html |
100 | 121 | git checkout -f gh-pages |
101 | 122 | |
102 | 123 | - name: Publish to gh-pages |
|
0 commit comments