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 5c87f77
Showing 1 changed file with 26 additions and 25 deletions.
51 changes: 26 additions & 25 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,13 @@ jobs:
uses: actions/checkout@v4
with:
repository: tuw-geo/eo-datascience-cookbook
path: eo-datascience-cookbook
path: pythia

- run: echo $(ls -la)

- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2

- name: Restore Cache Conda Environments
uses: actions/cache/restore@v4
with:
path: |
~/.local/share/jupyter/kernels
/usr/share/miniconda/envs
key: ${{ runner.os }}-conda

- name: Render and Publish
id: setup-python
uses: quarto-dev/quarto-actions/publish@v2
Expand All @@ -45,12 +39,10 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Save Cache Conda Environments
uses: actions/cache/save@v4
- name: Set Conda Cache
uses: actions/cache@v3
with:
path: |
~/.local/share/jupyter/kernels
/usr/share/miniconda/envs
path: /usr/share/miniconda/envs
key: ${{ runner.os }}-conda-${{ hashFiles('chapters/*.yml') }}

# - name: Cache Binder Build on mybinder.org
Expand All @@ -60,27 +52,36 @@ 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"
- name: Push Commit
- name: Push Commit Quarto Book
if: github.ref == 'refs/heads/main'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main
force: true

# - 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
- name: Commit Files Pythia Book
if: github.ref == 'refs/heads/main'
run: |
cp ./notebooks/*.ipynb ./pythia/notebooks/*.ipynb
NB_PATH=./pythia/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"
- name: Push Commit 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
directory: pythia

0 comments on commit 5c87f77

Please sign in to comment.