Skip to content

Commit

Permalink
publish to pythia
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinSchobben committed Jul 19, 2024
1 parent 7ecadef commit f57c283
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: tuw-geo/eo-datascience-cookbook
path: eo-datascience-cookbook
path: pythia

- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
Expand All @@ -34,8 +34,10 @@ jobs:
with:
path: |
~/.local/share/jupyter/kernels
~/.cache/pip
/usr/share/miniconda/envs
key: ${{ runner.os }}-conda
key: ${{ runner.os }}-conda-${{ hashFiles('chapters/*.yml') }}
restore-key: ${{ runner.os }}-conda-${{ hashFiles('chapters/*.yml') }}

- name: Render and Publish
id: setup-python
Expand All @@ -50,6 +52,7 @@ jobs:
with:
path: |
~/.local/share/jupyter/kernels
~/.cache/pip
/usr/share/miniconda/envs
key: ${{ runner.os }}-conda-${{ hashFiles('chapters/*.yml') }}

Expand All @@ -60,27 +63,24 @@ jobs:
# MYBINDERORG_TAG: ${{ github.event.ref }}
# REPO2DOCKER_EXTRA_ARGS: --subdir notebooks

- name: Commit Files
- name: Commit Files Quarto Book
if: github.ref == 'refs/heads/main'
run: |
NB_PATH=notebooks/*.ipynb
NB_PATH=./notebooks/*.ipynb
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
git commit ${NB_PATH[*]} -m "Quarto output" || echo "No changes to commit"
git push origin || echo "No changes to commit"
- name: Push Commit
- name: Commit Files Pythia Book
if: github.ref == 'refs/heads/main'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main
force: true
run: |
cp ./notebooks/*.ipynb ./pythia/notebooks/
cd ./pythia
NB_PATH=./notebooks/*.ipynb
git config --unset-all http.https://github.com/.extraheader
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
git commit ${NB_PATH[*]} -m "Quarto output" || echo "No changes to commit"
git push origin || echo "No changes to commit"
# - 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

0 comments on commit f57c283

Please sign in to comment.