|
| 1 | +name: Deploy slides to GitHub Pages |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [main] |
| 6 | + workflow_dispatch: |
| 7 | + |
| 8 | +permissions: |
| 9 | + contents: read |
| 10 | + pages: write |
| 11 | + id-token: write |
| 12 | + |
| 13 | +# Avoid clobbering an in-flight deploy with a newer push; let it finish. |
| 14 | +concurrency: |
| 15 | + group: pages |
| 16 | + cancel-in-progress: false |
| 17 | + |
| 18 | +jobs: |
| 19 | + build: |
| 20 | + runs-on: ubuntu-latest |
| 21 | + steps: |
| 22 | + - uses: actions/checkout@v4 |
| 23 | + |
| 24 | + - name: Install mdslides |
| 25 | + # Pin the version so the deck doesn't drift on us between meetups. |
| 26 | + run: cargo install --locked --git https://github.com/ferrous-systems/mdslides --tag v0.7.2 |
| 27 | + |
| 28 | + - name: Render 2026-Q2 slides |
| 29 | + working-directory: 2026-Q2/workshop |
| 30 | + run: ./build-slides.sh |
| 31 | + |
| 32 | + - name: Stage site |
| 33 | + run: | |
| 34 | + set -euo pipefail |
| 35 | + mkdir -p _site/2026-Q2 |
| 36 | + cp -R 2026-Q2/workshop/slides/. _site/2026-Q2/ |
| 37 | + cat > _site/index.html <<'HTML' |
| 38 | + <!doctype html> |
| 39 | + <html lang="en"> |
| 40 | + <head> |
| 41 | + <meta charset="utf-8"> |
| 42 | + <meta name="viewport" content="width=device-width, initial-scale=1"> |
| 43 | + <title>Rust Munich — Hacking</title> |
| 44 | + <link rel="preconnect" href="https://fonts.googleapis.com"> |
| 45 | + <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> |
| 46 | + <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=JetBrains+Mono:wght@400;700&display=swap" rel="stylesheet"> |
| 47 | + <style> |
| 48 | + :root { |
| 49 | + --bg: #1d2021; --bg1: #3c3836; --fg: #ebdbb2; --fg2: #d5c4a1; |
| 50 | + --gray: #928374; --orange: #fe8019; --yellow: #fabd2f; --aqua: #8ec07c; --blue: #83a598; |
| 51 | + } |
| 52 | + * { box-sizing: border-box; } |
| 53 | + body { |
| 54 | + margin: 0; background: var(--bg); color: var(--fg); |
| 55 | + font: 16px/1.5 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; |
| 56 | + min-height: 100vh; display: flex; justify-content: center; |
| 57 | + padding: 4rem 1.5rem; |
| 58 | + } |
| 59 | + main { max-width: 640px; width: 100%; } |
| 60 | + .crumb { font-family: 'JetBrains Mono', monospace; font-size: 14px; color: var(--gray); margin-bottom: 2.5rem; } |
| 61 | + .crumb .accent { color: var(--orange); } |
| 62 | + h1 { font-size: 2.6rem; line-height: 1.1; margin: 0 0 0.3em; color: var(--orange); font-weight: 700; letter-spacing: -0.02em; } |
| 63 | + h1::after { content: ''; display: block; width: 4rem; height: 4px; background: var(--yellow); margin-top: 0.4em; border-radius: 2px; } |
| 64 | + .tagline { color: var(--fg2); margin-bottom: 3rem; } |
| 65 | + h2 { color: var(--yellow); font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.08em; margin: 3rem 0 1rem; font-weight: 600; } |
| 66 | + ul { list-style: none; padding: 0; margin: 0; } |
| 67 | + li a { |
| 68 | + display: flex; align-items: baseline; gap: 0.6em; |
| 69 | + color: var(--fg); text-decoration: none; font-size: 1.05rem; |
| 70 | + padding: 0.7em 0; border-bottom: 1px solid var(--bg1); |
| 71 | + transition: color 120ms ease; |
| 72 | + } |
| 73 | + li a::before { content: '→'; color: var(--aqua); font-family: 'JetBrains Mono', monospace; font-weight: 700; } |
| 74 | + li a:hover, li a:hover::before { color: var(--orange); } |
| 75 | + footer { margin-top: 4rem; font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--gray); border-top: 1px solid var(--bg1); padding-top: 1.5rem; } |
| 76 | + footer a { color: var(--blue); text-decoration: none; } |
| 77 | + footer a:hover { color: var(--orange); } |
| 78 | + </style> |
| 79 | + </head> |
| 80 | + <body> |
| 81 | + <main> |
| 82 | + <div class="crumb"><span class="accent">~/</span>rust-munich<span class="accent"> ·</span> hacking evenings</div> |
| 83 | + <h1>Rust Munich — Hacking</h1> |
| 84 | + <p class="tagline">Slide decks and code from our quarterly hacking evenings.</p> |
| 85 | + <h2>Events</h2> |
| 86 | + <ul> |
| 87 | + <li><a href="2026-Q2/">2026 / Q2 — Crux + gpui</a></li> |
| 88 | + </ul> |
| 89 | + <footer> |
| 90 | + <a href="https://github.com/sassman/rust-munich-hacking">source on GitHub</a> |
| 91 | + </footer> |
| 92 | + </main> |
| 93 | + </body> |
| 94 | + </html> |
| 95 | + HTML |
| 96 | +
|
| 97 | + - uses: actions/upload-pages-artifact@v3 |
| 98 | + with: |
| 99 | + path: _site |
| 100 | + |
| 101 | + deploy: |
| 102 | + needs: build |
| 103 | + runs-on: ubuntu-latest |
| 104 | + environment: |
| 105 | + name: github-pages |
| 106 | + url: ${{ steps.deployment.outputs.page_url }} |
| 107 | + steps: |
| 108 | + - id: deployment |
| 109 | + uses: actions/deploy-pages@v4 |
0 commit comments