This repository has been archived by the owner on Jul 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0aadef4
commit ee2b54b
Showing
5 changed files
with
20 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,8 +13,6 @@ jobs: | |
steps: | ||
- name: Checkout Quarto Book | ||
uses: actions/checkout@v4 | ||
with: | ||
path: main | ||
|
||
- name: Checkout Pythia Book | ||
uses: actions/checkout@v4 | ||
|
@@ -25,20 +23,29 @@ jobs: | |
- name: Set up Quarto | ||
uses: quarto-dev/quarto-actions/setup@v2 | ||
|
||
- name: Restore Cache Jupyter Kernels | ||
id: cache-jupyter-kernels-restore | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: ~/.local/share/jupyter/kernels | ||
key: ${{ runner.os }}-jupyter-${{ hashFiles('chapters/*.yml') }} | ||
|
||
- name: Render and Publish | ||
id: setup-python | ||
uses: quarto-dev/quarto-actions/publish@v2 | ||
with: | ||
path: main | ||
target: gh-pages | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- run: echo $(ls ~/.local/share/jupyter/kernels) | ||
|
||
- name: Cache Jupyter Kernels | ||
uses: actions/cache@v3 | ||
id: cache-jupyter-kernels-save | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: ~/.local/share/jupyter/kernels | ||
key: ${{ runner.os }}-python-${{ steps.setup-python.outputs.python-version }}-jupyter-${{ hashFiles('chapters/*.yml') }} | ||
key: ${{ steps.cache-jupyter-kernels-restore.outputs.cache-primary-key }} | ||
|
||
# - name: Cache Binder Build on mybinder.org | ||
# uses: jupyterhub/repo2docker-action@master | ||
|
@@ -47,15 +54,15 @@ jobs: | |
# MYBINDERORG_TAG: ${{ github.event.ref }} | ||
# REPO2DOCKER_EXTRA_ARGS: --subdir notebooks | ||
|
||
- run: echo $(ls $(pwd)/notebooks) | ||
|
||
- name: Commit Files | ||
if: github.ref == 'refs/heads/main' | ||
run: | | ||
cp main/notebooks/*.ipynb eo-datascience-cookbook/notebooks/*.ipynb | ||
cd eo-datascience-cookbook | ||
NB_PATH=($(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep '[.]ipynb$')) | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git add notebooks/*.ipynb | ||
git commit -m "Quarto output" | ||
git commit ${RMD_PATH[*]/.ipynb} -m "Quarto output" | ||
- name: Push Commit | ||
if: github.ref == 'refs/heads/main' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,4 @@ | |
.env | ||
/.quarto/ | ||
/_book/ | ||
/data/ | ||
/**/*.ipynb | ||
/data/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters