|
1 | 1 | on:
|
2 | 2 | workflow_dispatch:
|
3 | 3 | push:
|
4 |
| - tags: [ v* ] |
| 4 | + tags: [v*] |
5 | 5 | # When a tag like v2024.11.27 is created, the workflow will be triggered
|
6 | 6 | # Should follow https://calver.org/ for versioning
|
7 | 7 |
|
8 | 8 | name: Pythia Publish
|
9 | 9 |
|
10 | 10 | permissions:
|
11 |
| - contents: write |
12 |
| - pages: write |
| 11 | + contents: write |
| 12 | + pages: write |
13 | 13 |
|
14 | 14 | jobs:
|
15 | 15 | build-deploy:
|
|
25 | 25 | - name: Checkout Pythia Book
|
26 | 26 | uses: actions/checkout@v4
|
27 | 27 | with:
|
28 |
| - repository: tuw-geo/eo-datascience-cookbook |
| 28 | + repository: ProjectPythia/eo-datascience-cookbook |
29 | 29 | path: pythia
|
30 | 30 | fetch-depth: 0
|
31 | 31 | token: ${{ secrets.BOT_TOKEN }}
|
|
37 | 37 | - name: Install Python and Jupyter
|
38 | 38 | uses: actions/setup-python@v5
|
39 | 39 | with:
|
40 |
| - python-version: '3.11' |
41 |
| - cache: 'pip' |
| 40 | + python-version: "3.11" |
| 41 | + cache: "pip" |
42 | 42 | - run: pip install jupyter jupyter-cache
|
43 | 43 |
|
44 | 44 | - name: Cache Environment
|
@@ -66,14 +66,20 @@ jobs:
|
66 | 66 | - name: Commit Files Pythia Book
|
67 | 67 | run: |
|
68 | 68 | python -m pip install .
|
69 |
| - python -m pip install nbstripout |
| 69 | + python -m pip install nbstripout black flake8 isort nbqa |
70 | 70 | render_sfinx_toc ./pythia
|
71 | 71 | clean_nb ./notebooks ./pythia/notebooks
|
72 | 72 | cp -rf ./chapters/references.bib ./pythia/notebooks/
|
73 | 73 | cp -rf --parents ./notebooks/images ./pythia
|
74 | 74 | cp -rf --parents $(find notebooks -name "*.yml") ./pythia
|
75 | 75 | cd ./pythia
|
76 | 76 | find . -name '*.ipynb' -exec nbstripout {} +
|
| 77 | + find . -name '*.ipynb' -exec nbqa black {} + |
| 78 | + find . -name '*.ipynb' -exec nbqa isort {} + |
| 79 | + find . -name '*.ipynb' -exec nbqa flake8 {} + |
| 80 | + python -m black . |
| 81 | + python -m flake8 . |
| 82 | + python -m isort . |
77 | 83 | git config --local user.name "$GITHUB_ACTOR"
|
78 | 84 | git config --local user.email "[email protected]"
|
79 | 85 | git add .
|
|
0 commit comments