Skip to content

Commit 4024380

Browse files
katoueclaude
andcommitted
Add CI/CD workflow for building slides and deploying website
- Build LaTeX slides automatically on push - Upload PDF as artifact for each build - Deploy website with slides to GitHub Pages Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 0754a5c commit 4024380

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Build and Deploy
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build-slides:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Setup LaTeX
17+
uses: xu-cheng/latex-action@v3
18+
with:
19+
working_directory: slides
20+
root_file: week2_slides.tex
21+
22+
- name: Upload PDF artifact
23+
uses: actions/upload-artifact@v4
24+
with:
25+
name: slides-pdf
26+
path: slides/week2_slides.pdf
27+
28+
deploy:
29+
runs-on: ubuntu-latest
30+
needs: build-slides
31+
if: github.ref == 'refs/heads/main'
32+
permissions:
33+
contents: read
34+
pages: write
35+
id-token: write
36+
environment:
37+
name: github-pages
38+
url: ${{ steps.deployment.outputs.page_url }}
39+
steps:
40+
- name: Checkout repository
41+
uses: actions/checkout@v4
42+
43+
- name: Download slides PDF
44+
uses: actions/download-artifact@v4
45+
with:
46+
name: slides-pdf
47+
path: docs/slides
48+
49+
- name: Setup Pages
50+
uses: actions/configure-pages@v4
51+
52+
- name: Upload artifact
53+
uses: actions/upload-pages-artifact@v3
54+
with:
55+
path: docs
56+
57+
- name: Deploy to GitHub Pages
58+
id: deployment
59+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)