diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 0083834..0659498 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -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 @@ -29,10 +27,11 @@ jobs: 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 @@ -47,15 +46,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=$(pwd)/notebooks git config --local user.email "action@github.com" git config --local user.name "GitHub Action" - git add notebooks/*.ipynb - git commit -m "Quarto output" + git commit ${NB_PATH[*]/.ipynb} -m "Quarto output" - name: Push Commit if: github.ref == 'refs/heads/main' diff --git a/.gitignore b/.gitignore index f316924..b11b2d1 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,4 @@ .env /.quarto/ /_book/ -/data/ -/**/*.ipynb \ No newline at end of file +/data/ \ No newline at end of file diff --git a/Makefile b/Makefile index 76dcb57..e8bfc30 100644 --- a/Makefile +++ b/Makefile @@ -35,6 +35,7 @@ kernel: $(KERNEL_DIR) post-render: - mv chapters/*.ipynb notebooks/ >/dev/null 2>&1 + - for f in chapters/*.quarto_ipynb ; do mv -- "$f" "${f%.quarto_ipynb}.ipynb" >/dev/null 2>&1; done cp Makefile notebooks/ data: