Skip to content

Commit 1d37b07

Browse files
jonphippsclaude
andcommitted
feat: add GitHub Pages deployment for development environment
- Creates unified build directory with portal at root - Deploys all standard sites to subdirectories - Configures for development environment (DOCS_ENV=development) - Deploys to jonphipps.github.io/standards-dev - Fixes 404 errors reported in post-deploy validation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent d0e2c91 commit 1d37b07

File tree

1 file changed

+93
-0
lines changed

1 file changed

+93
-0
lines changed
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: Development Deploy
2+
# Deploys to GitHub Pages for development environment testing
3+
# This runs on the development fork (jonphipps/standards-dev)
4+
5+
on:
6+
push:
7+
branches: [dev]
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
concurrency:
16+
group: "pages"
17+
cancel-in-progress: false
18+
19+
env:
20+
HUSKY: 0
21+
# Development environment configuration
22+
DOCS_ENV: development
23+
SITE_TITLE: IFLA Standards Portal (Development)
24+
SITE_TAGLINE: International Federation of Library Associations and Institutions
25+
26+
jobs:
27+
build:
28+
name: Build for Development Environment
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v4
33+
with:
34+
fetch-depth: 0
35+
36+
- name: Setup pnpm
37+
uses: pnpm/action-setup@v4
38+
39+
- name: Setup Node.js
40+
uses: actions/setup-node@v4
41+
with:
42+
node-version: '22'
43+
cache: 'pnpm'
44+
45+
- name: Setup Pages
46+
uses: actions/configure-pages@v5
47+
48+
- name: Install dependencies
49+
run: pnpm install --frozen-lockfile
50+
51+
- name: Build theme package
52+
run: npx nx run @ifla/theme:build
53+
54+
- name: Build all sites for development
55+
run: |
56+
echo "🏗️ Building all sites for development environment..."
57+
npx nx run-many --target=build --all --parallel=3
58+
59+
- name: Create unified build directory
60+
run: |
61+
echo "📦 Creating unified build directory..."
62+
mkdir -p _site
63+
64+
# Copy portal to root
65+
cp -r portal/build/* _site/
66+
67+
# Copy each standard site to its subdirectory
68+
for site in ISBDM LRM FRBR isbd muldicat unimarc newtest; do
69+
if [ -d "standards/$site/build" ]; then
70+
echo "Copying $site..."
71+
mkdir -p "_site/$site"
72+
cp -r "standards/$site/build/"* "_site/$site/"
73+
fi
74+
done
75+
76+
echo "✅ Unified build created"
77+
78+
- name: Upload artifact
79+
uses: actions/upload-pages-artifact@v3
80+
with:
81+
path: ./_site
82+
83+
deploy:
84+
name: Deploy to GitHub Pages
85+
environment:
86+
name: github-pages
87+
url: ${{ steps.deployment.outputs.page_url }}
88+
runs-on: ubuntu-latest
89+
needs: build
90+
steps:
91+
- name: Deploy to GitHub Pages
92+
id: deployment
93+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)