Skip to content

Commit da96943

Browse files
committed
CI: publish PDF to GitHub Pages for inline browser viewing (site/index.html + Pages deploy)
1 parent 2e41e97 commit da96943

2 files changed

Lines changed: 74 additions & 1 deletion

File tree

.github/workflows/build.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@ name: Build & Release Resume
33
on:
44
push:
55
branches: [main]
6-
paths: ['resume.html', 'photo.jpg', 'build.sh', '.github/workflows/build.yml']
6+
paths: ['resume.html', 'photo.jpg', 'build.sh', 'site/**', '.github/workflows/build.yml']
77
workflow_dispatch:
88

99
permissions:
1010
contents: write
11+
pages: write
12+
id-token: write
1113

1214
concurrency:
1315
group: resume-release
@@ -16,6 +18,9 @@ concurrency:
1618
jobs:
1719
build:
1820
runs-on: ubuntu-latest
21+
environment:
22+
name: github-pages
23+
url: ${{ steps.deployment.outputs.page_url }}
1924
steps:
2025
- uses: actions/checkout@v4
2126

@@ -45,3 +50,21 @@ jobs:
4550
Commit ${{ github.sha }}.
4651
files: Aswin_Resume.pdf
4752
make_latest: true
53+
54+
# Publish a browser-viewable copy to GitHub Pages.
55+
# Pages serves the PDF with Content-Type application/pdf (no attachment
56+
# disposition), so it renders inline instead of downloading.
57+
- name: Assemble Pages site
58+
run: |
59+
mkdir -p _site
60+
cp site/index.html _site/index.html
61+
cp Aswin_Resume.pdf _site/Aswin_Resume.pdf
62+
63+
- name: Upload Pages artifact
64+
uses: actions/upload-pages-artifact@v3
65+
with:
66+
path: _site
67+
68+
- name: Deploy to GitHub Pages
69+
id: deployment
70+
uses: actions/deploy-pages@v4

site/index.html

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<title>Aswin — Resume</title>
7+
<meta name="description" content="Aswin — Software Engineer. Resume.">
8+
<style>
9+
:root { --navy:#16215a; --gold:#c9a86b; }
10+
* { box-sizing:border-box; }
11+
html,body { margin:0; height:100%; }
12+
body {
13+
font-family: "Liberation Sans", Arial, Helvetica, sans-serif;
14+
background:#eef0f4; color:var(--navy);
15+
display:flex; flex-direction:column; min-height:100vh;
16+
}
17+
header {
18+
background:var(--navy); color:#fff;
19+
display:flex; align-items:center; justify-content:space-between;
20+
gap:16px; padding:12px 20px; flex-wrap:wrap;
21+
}
22+
header .who { font-size:18px; font-weight:bold; letter-spacing:.5px; }
23+
header .who span { color:var(--gold); font-weight:normal; margin-left:8px; letter-spacing:2px; font-size:13px; text-transform:uppercase; }
24+
.dl {
25+
background:var(--gold); color:var(--navy); text-decoration:none;
26+
font-weight:bold; font-size:14px; padding:9px 16px; border-radius:6px;
27+
white-space:nowrap;
28+
}
29+
.dl:hover { filter:brightness(1.06); }
30+
main { flex:1; display:flex; }
31+
object, iframe { flex:1; width:100%; border:0; }
32+
.fallback { padding:40px; text-align:center; }
33+
.fallback a { color:var(--navy); }
34+
</style>
35+
</head>
36+
<body>
37+
<header>
38+
<div class="who">Aswin<span>Software Engineer</span></div>
39+
<a class="dl" href="Aswin_Resume.pdf" download>Download PDF</a>
40+
</header>
41+
<main>
42+
<object data="Aswin_Resume.pdf" type="application/pdf">
43+
<div class="fallback">
44+
<p>Your browser can't display the PDF inline.</p>
45+
<p><a href="Aswin_Resume.pdf">Open the resume PDF</a></p>
46+
</div>
47+
</object>
48+
</main>
49+
</body>
50+
</html>

0 commit comments

Comments
 (0)