Skip to content

Commit dd144c3

Browse files
committed
All together now.
1 parent 9bb7fc0 commit dd144c3

File tree

4 files changed

+28
-5
lines changed

4 files changed

+28
-5
lines changed

.github/workflows/publish.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,17 @@ jobs:
3535
- name: Pull
3636
id: pull
3737
run: poetry run python -m uc_python.pull
38-
- name: Make slides
39-
id: make
40-
41-
- name: Make slides
38+
- name: Build slides
4239
id: build
40+
run: poetry run python -m uc_python.build
41+
- name: Create site
42+
id: collate
43+
run: poetry run python -m uc_python.collate
44+
- name: Upload artifact
45+
id: upload
4346
uses: actions/upload-pages-artifact@v1
4447
with:
45-
path: build
48+
path: site
4649
- name: Deploy to GitHub Pages
4750
id: deployment
4851
uses: actions/deploy-pages@v1

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
repos/
2+
site/

uc_python/build.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import os
2+
from subprocess import run
3+
from pathlib import Path
4+
5+
folder = Path("repos")
6+
7+
for repo in folder.glob("*"):
8+
os.chdir(repo)
9+
print(f"building slides for {repo.name}...")
10+
run(["make", "slides"], check=True)
11+
print("done")

uc_python/collate.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from pathlib import Path
2+
3+
folder = Path("repos")
4+
site = Path("site")
5+
site.mkdir(exist_ok=True)
6+
7+
for repo in folder.glob("*"):
8+
(repo / "slides").rename(site / repo.name)

0 commit comments

Comments
 (0)