Skip to content

Commit 5c93f32

Browse files
authored
Merge pull request #7 from ptarmiganlabs/copilot/fix-6
Add npm scripts for building and deploying to GitHub Pages as "bsi.ptarmiganlabs.com"
2 parents f0c92f3 + 222aed2 commit 5c93f32

File tree

6 files changed

+732
-4
lines changed

6 files changed

+732
-4
lines changed

DEPLOYMENT.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# GitHub Pages Deployment Guide
2+
3+
This document outlines the steps to deploy the Butler Sheet Icons documentation to GitHub Pages with the custom domain `bsi.ptarmiganlabs.com`.
4+
5+
## Automated Steps (npm scripts)
6+
7+
The following npm scripts have been added for automated deployment:
8+
9+
```bash
10+
# Build and deploy in one command
11+
npm run deploy
12+
13+
# Or run steps separately:
14+
npm run deploy:build # Build the documentation site
15+
npm run deploy:publish # Deploy to gh-pages branch
16+
```
17+
18+
## Manual Setup Required
19+
20+
### 1. DNS Configuration
21+
22+
You need to create a CNAME record in your DNS provider (ptarmiganlabs.com):
23+
24+
- **Record Type**: CNAME
25+
- **Name**: `bsi` (creates bsi.ptarmiganlabs.com)
26+
- **Value**: `ptarmiganlabs.github.io`
27+
- **TTL**: 300 seconds (or your preferred value)
28+
29+
### 2. GitHub Repository Settings
30+
31+
In the GitHub repository settings:
32+
33+
1. Go to **Settings****Pages**
34+
2. Under **Source**, select "Deploy from a branch"
35+
3. Select **Branch**: `gh-pages` and **Folder**: `/ (root)`
36+
4. Under **Custom domain**, enter: `bsi.ptarmiganlabs.com`
37+
5. Check **Enforce HTTPS** (recommended)
38+
6. Save the settings
39+
40+
### 3. First Deployment
41+
42+
After the manual setup is complete:
43+
44+
1. Run `npm run deploy` to build and deploy the site
45+
2. Wait for GitHub to process the deployment (usually 1-5 minutes)
46+
3. Verify the site is accessible at https://bsi.ptarmiganlabs.com
47+
48+
## Files Configured
49+
50+
- **CNAME file**: Located at `docs/public/CNAME` (contains `bsi.ptarmiganlabs.com`)
51+
- **.nojekyll file**: Located at `docs/public/.nojekyll` (tells GitHub Pages to skip Jekyll processing)
52+
- **Package.json**: Updated with deployment scripts
53+
- **gh-pages package**: Added as dev dependency for deployment
54+
55+
## Troubleshooting
56+
57+
### DNS Issues
58+
- DNS propagation can take up to 24 hours
59+
- Use tools like `dig` or online DNS checkers to verify the CNAME record
60+
- Test with `dig bsi.ptarmiganlabs.com` - should return `ptarmiganlabs.github.io`
61+
62+
### GitHub Pages Issues
63+
- Check the **Actions** tab for deployment status
64+
- Ensure the `gh-pages` branch exists and contains the built files
65+
- Verify the custom domain is correctly configured in repository settings
66+
67+
### Build Issues
68+
- Run `npm run docs:build` locally to test the build
69+
- Check that `docs/.vitepress/dist/` contains the CNAME file after building
70+
- Ensure all dependencies are installed with `npm install`
71+
72+
## Alternative: GitHub Actions
73+
74+
Instead of using npm scripts, you can set up GitHub Actions for automatic deployment on every push to main. See the README.md for the workflow configuration.

README.md

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,44 @@ Custom styles can be added via:
121121

122122
## 🚀 Deployment
123123

124-
### GitHub Pages
124+
### GitHub Pages with Custom Domain (bsi.ptarmiganlabs.com)
125125

126-
The site can be deployed to GitHub Pages using GitHub Actions:
126+
The site is configured to deploy to GitHub Pages with the custom domain `bsi.ptarmiganlabs.com`.
127+
128+
#### Automated Deployment Scripts
129+
130+
```bash
131+
# Build and deploy in one command
132+
npm run deploy
133+
134+
# Or run steps separately
135+
npm run deploy:build # Build the site
136+
npm run deploy:publish # Deploy to gh-pages branch
137+
```
138+
139+
#### Manual Setup Required
140+
141+
**1. DNS Configuration**
142+
- Create a CNAME record in your DNS provider:
143+
- **Name**: `bsi` (or `bsi.ptarmiganlabs`)
144+
- **Value**: `ptarmiganlabs.github.io`
145+
- **TTL**: 300 (or your preferred value)
146+
147+
**2. GitHub Repository Settings**
148+
- Go to repository Settings → Pages
149+
- Set **Source** to "Deploy from a branch"
150+
- Select **Branch**: `gh-pages` and **Folder**: `/ (root)`
151+
- Set **Custom domain** to: `bsi.ptarmiganlabs.com`
152+
- Enable **Enforce HTTPS**
153+
154+
**3. Verify Setup**
155+
- DNS propagation may take up to 24 hours
156+
- GitHub will verify domain ownership automatically
157+
- Check that https://bsi.ptarmiganlabs.com loads correctly
158+
159+
#### Alternative: GitHub Actions Deployment
160+
161+
You can also use GitHub Actions for automated deployment:
127162

128163
```yaml
129164
name: Deploy Documentation

docs/public/.nojekyll

Whitespace-only changes.

docs/public/CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bsi.ptarmiganlabs.com

0 commit comments

Comments
 (0)