1- name : Generate PDFs and Deploy Docs
1+ name : Generate PDFs
22
33# Triggered by:
44# - push to master that changes lecture markdown files
@@ -188,68 +188,4 @@ jobs:
188188 done
189189 env :
190190 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
191- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
192-
193- # -------------------------------------------------------------------------
194- # Job 2 – regenerate docs/index.html and inject PDF links
195- # -------------------------------------------------------------------------
196- deploy_docs :
197- name : Build and deploy docs
198- runs-on : ubuntu-latest
199- needs : generate_pdfs
200- steps :
201- - name : Checkout repository
202- uses : actions/checkout@v4
203- with :
204- token : ${{ secrets.GITHUB_TOKEN }}
205-
206- # Pull any version-bump commits pushed by the generate_pdfs job so that
207- # liaex fetches up-to-date metadata from raw.githubusercontent.com.
208- - name : Pull latest commits (including any version bumps)
209- run : git pull --ff-only origin master || git pull origin master
210-
211- - name : Set up Node.js
212- uses : actions/setup-node@v4
213- with :
214- node-version : ' 22'
215-
216- - name : Install LiaScript exporter
217- run : npm install -g @liascript/exporter
218-
219- - name : Set up Python
220- uses : actions/setup-python@v5
221- with :
222- python-version : ' 3.x'
223-
224- - name : Install Python dependencies
225- run : pip install beautifulsoup4 requests
226-
227- - name : Generate docs/index.html from course.yml
228- run : |
229- mkdir -p docs
230- liaex \
231- --input course.yml \
232- --format project \
233- --output docs/index \
234- --project-category-blur
235-
236- - name : Copy CSS into docs/
237- run : cp linklayout.css docs/linklayout.css
238-
239- - name : Inject PDF download links
240- run : python inject_pdf_links.py docs/index.html docs/index.html
241-
242- - name : Commit docs/ to repository
243- run : |
244- git config user.name "github-actions[bot]"
245- git config user.email "github-actions[bot]@users.noreply.github.com"
246- git add docs/
247- if git diff --staged --quiet; then
248- echo "No changes in docs/ – nothing to commit."
249- else
250- if ! git pull --rebase origin master; then
251- echo "WARNING: git pull --rebase failed; attempting to push without rebase."
252- fi
253- git commit -m "ci: update docs/index.html with PDF links [skip ci]"
254- git push
255- fi
191+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments