This repository has been archived by the owner on Jul 19, 2024. It is now read-only.
update path #27
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
on: | |
workflow_dispatch: | |
push: | |
branches: main | |
name: Quarto Publish | |
jobs: | |
build-deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout Quarto Book | |
uses: actions/checkout@v4 | |
- name: Checkout Pythia Book | |
uses: actions/checkout@v4 | |
with: | |
repository: tuw-geo/eo-datascience-cookbook | |
path: eo-datascience-cookbook | |
- name: Set up Quarto | |
uses: quarto-dev/quarto-actions/setup@v2 | |
- name: Render and Publish | |
id: setup-python | |
uses: quarto-dev/quarto-actions/publish@v2 | |
with: | |
target: gh-pages | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- run: echo $(ls ~/.local/share/jupyter/kernels) | |
- name: Cache Jupyter Kernels | |
uses: actions/cache@v3 | |
with: | |
path: ~/.local/share/jupyter/kernels | |
key: ${{ runner.os }}-jupyter-${{ hashFiles('chapters/*.yml') }} | |
restore-keys: ${{ runner.os }}-jupyter | |
# - name: Cache Binder Build on mybinder.org | |
# uses: jupyterhub/repo2docker-action@master | |
# with: | |
# NO_PUSH: true | |
# 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: | | |
NB_PATH=$(pwd)/notebooks | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git commit ${NB_PATH[*]/.ipynb} -m "Quarto output" | |
- name: Push Commit | |
if: github.ref == 'refs/heads/main' | |
uses: ad-m/github-push-action@master | |
with: | |
directory: eo-datascience-cookbook | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: main | |
force: true |