Skip to content

Commit 82839c1

Browse files
ci: build site before Pages deploy and publish dist (#18)
* ci: deploy built dist assets for pages Run the build pipeline in the Pages workflow, upload only dist/, and add a .nojekyll marker for deployment.\n\nUpdate build scripts so CSS output names match HTML references, remove the stale about CSS minification step, and copy required static assets into dist/.\n\nRemove the non-functional _headers file used by Netlify-style hosting. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * landing: polish spacing, CTA, and scroll reveal effects Improve the homepage visual rhythm with a section spacing scale, stronger section transitions, and a clearer hero hierarchy. Moves the SIMULATE action into the hero, adds micro-interactions and subtle starfield motion, and introduces scroll-triggered reveal animations for section content. Closes #13. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chore: remove unrelated UI changes from CI PR Keep PR #12 focused on the build/deploy pipeline by reverting the accidental index and CSS visual changes from this branch. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent e5e0d71 commit 82839c1

3 files changed

Lines changed: 17 additions & 56 deletions

File tree

.github/workflows/static.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,23 @@ jobs:
3131
steps:
3232
- name: Checkout
3333
uses: actions/checkout@v4
34+
- name: Setup Node.js
35+
uses: actions/setup-node@v4
36+
with:
37+
node-version: 20
38+
cache: "npm"
39+
- name: Install dependencies
40+
run: npm ci
41+
- name: Build site
42+
run: npm run build
43+
- name: Add .nojekyll
44+
run: touch dist/.nojekyll
3445
- name: Setup Pages
3546
uses: actions/configure-pages@v5
3647
- name: Upload artifact
3748
uses: actions/upload-pages-artifact@v3
3849
with:
39-
# Upload entire repository
40-
path: "."
50+
path: "dist"
4151
- name: Deploy to GitHub Pages
4252
id: deployment
4353
uses: actions/deploy-pages@v4

_headers

Lines changed: 0 additions & 48 deletions
This file was deleted.

package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@
55
"scripts": {
66
"format": "prettier --write '**/*.{html,css,js}'",
77
"build": "npm run build:css && npm run build:html",
8-
"build:css": "npm run minify:css:main && npm run minify:css:footer && npm run minify:css:about",
8+
"build:css": "npm run minify:css:main && npm run minify:css:footer",
99
"build:html": "npm run minify:html:index && npm run minify:html:about",
10-
"minify:css:main": "lightningcss --minify --bundle css/main.css -o dist/css/main.min.css",
11-
"minify:css:footer": "lightningcss --minify --bundle css/footer.css -o dist/css/footer.min.css",
12-
"minify:css:about": "lightningcss --minify --bundle about-css/main.css -o dist/about-css/main.min.css",
10+
"minify:css:main": "lightningcss --minify --bundle css/main.css -o dist/css/main.css",
11+
"minify:css:footer": "lightningcss --minify --bundle css/footer.css -o dist/css/footer.css",
1312
"minify:html:index": "html-minifier --collapse-whitespace --remove-comments index.html -o dist/index.html",
1413
"minify:html:about": "html-minifier --collapse-whitespace --remove-comments about.html -o dist/about.html",
15-
"prebuild": "node -e \"const fs = require('fs'); ['dist', 'dist/css', 'dist/about-css', 'dist/images', 'dist/about-images'].forEach(dir => fs.mkdirSync(dir, {recursive: true}));\"",
16-
"postbuild": "node -e \"const fs = require('fs'); const copyDir = (src, dest) => { fs.readdirSync(src).forEach(file => { const srcPath = src + '/' + file; const destPath = dest + '/' + file; if (fs.statSync(srcPath).isDirectory()) { fs.mkdirSync(destPath, {recursive: true}); copyDir(srcPath, destPath); } else { fs.copyFileSync(srcPath, destPath); } }); }; copyDir('images', 'dist/images'); copyDir('about-images', 'dist/about-images'); copyDir('css/font-awesome', 'dist/css/font-awesome');\""
14+
"prebuild": "node -e \"const fs = require('fs'); fs.rmSync('dist', { recursive: true, force: true }); ['dist', 'dist/css', 'dist/images', 'dist/about-images'].forEach(dir => fs.mkdirSync(dir, { recursive: true }));\"",
15+
"postbuild": "node -e \"const fs = require('fs'); const path = require('path'); const copyDir = (src, dest) => { if (!fs.existsSync(src)) return; fs.mkdirSync(dest, { recursive: true }); for (const entry of fs.readdirSync(src, { withFileTypes: true })) { const srcPath = path.join(src, entry.name); const destPath = path.join(dest, entry.name); if (entry.isDirectory()) copyDir(srcPath, destPath); else fs.copyFileSync(srcPath, destPath); } }; const copyFile = (src, dest) => { if (!fs.existsSync(src)) return; fs.mkdirSync(path.dirname(dest), { recursive: true }); fs.copyFileSync(src, dest); }; copyDir('images', 'dist/images'); copyDir('about-images', 'dist/about-images'); copyDir('css/font-awesome', 'dist/css/font-awesome'); ['manifest.json', 'robots.txt', 'sitemap.xml', 'nasalization-rg.otf'].forEach(file => copyFile(file, path.join('dist', file)));\""
1716
},
1817
"devDependencies": {
1918
"prettier": "^3.3.3",

0 commit comments

Comments
 (0)