File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : deploy-pages
2+
3+ # Builds the Astro site (intro homepage + OpenAPI docs) together with the static
4+ # JSON data dump and deploys everything to GitHub Pages. The dataset does not need
5+ # to be complete — whatever is curated in data/ is published.
6+ # Enable once: Settings → Pages → Source = GitHub Actions.
7+ on :
8+ push :
9+ branches : [main]
10+ workflow_dispatch :
11+
12+ permissions :
13+ contents : read
14+ pages : write
15+ id-token : write
16+
17+ concurrency :
18+ group : pages
19+ cancel-in-progress : true
20+
21+ jobs :
22+ build :
23+ runs-on : ubuntu-latest
24+ steps :
25+ - uses : actions/checkout@v4
26+
27+ - uses : actions/setup-python@v5
28+ with :
29+ python-version : " 3.12"
30+ cache : pip
31+
32+ - name : Install Python deps
33+ run : pip install -e .
34+
35+ - name : Validate curated data
36+ run : python -m scripts.validate
37+
38+ - name : Generate static JSON dump + openapi.json
39+ run : python -m scripts.dump --output dump
40+
41+ - uses : actions/setup-node@v4
42+ with :
43+ node-version : " 22"
44+ cache : npm
45+ cache-dependency-path : site/package-lock.json
46+
47+ - name : Build Astro site
48+ run : |
49+ cd site
50+ npm ci
51+ npm run build
52+
53+ - name : Assemble site (Astro dist + JSON data dump)
54+ run : |
55+ mkdir -p _site
56+ cp -r site/dist/. _site/
57+ cp -r dump/. _site/
58+ touch _site/.nojekyll
59+
60+ - uses : actions/upload-pages-artifact@v3
61+ with :
62+ path : _site
63+
64+ deploy :
65+ needs : build
66+ runs-on : ubuntu-latest
67+ environment :
68+ name : github-pages
69+ url : ${{ steps.deployment.outputs.page_url }}
70+ steps :
71+ - id : deployment
72+ uses : actions/deploy-pages@v4
Original file line number Diff line number Diff line change 1+ # Astro / Node build artifacts
2+ node_modules /
3+ dist /
4+ .astro /
Original file line number Diff line number Diff line change 1+ import { defineConfig } from 'astro/config' ;
2+
3+ // GitHub Pages project site. Data dump (v1/, openapi.json) is copied alongside
4+ // the built site in CI, so internal links use import.meta.env.BASE_URL.
5+ export default defineConfig ( {
6+ site : 'https://seungpyo1007.github.io' ,
7+ base : '/TechAPI' ,
8+ } ) ;
You can’t perform that action at this time.
0 commit comments