|
| 1 | +# Deployment Guide |
| 2 | + |
| 3 | +This site is configured to deploy automatically to GitHub Pages using GitHub Actions. |
| 4 | + |
| 5 | +## Automatic Deployment |
| 6 | + |
| 7 | +1. Push changes to the `main` branch |
| 8 | +2. GitHub Actions will automatically build and deploy the site |
| 9 | +3. The site will be available at `https://[your-username].github.io` |
| 10 | + |
| 11 | +## Manual Deployment |
| 12 | + |
| 13 | +If you need to deploy manually: |
| 14 | + |
| 15 | +```bash |
| 16 | +# Build the site |
| 17 | +npm run build |
| 18 | + |
| 19 | +# The static files will be in the out/ directory |
| 20 | +# You can commit and push these files to the gh-pages branch |
| 21 | +``` |
| 22 | + |
| 23 | +## Custom Domain Setup |
| 24 | + |
| 25 | +### For Cloudflare Users (thomaslbohn.com) |
| 26 | + |
| 27 | +1. Create a `CNAME` file in the `public/` directory with your domain: |
| 28 | + ``` |
| 29 | + thomaslbohn.com |
| 30 | + ``` |
| 31 | + Or if you want to use www: |
| 32 | + ``` |
| 33 | + www.thomaslbohn.com |
| 34 | + ``` |
| 35 | + |
| 36 | +2. Configure DNS records in Cloudflare: |
| 37 | + |
| 38 | + **For Apex Domain (thomaslbohn.com):** |
| 39 | + - Go to Cloudflare Dashboard > DNS > Records |
| 40 | + - Add a **CNAME** record (Cloudflare supports CNAME flattening for apex domains): |
| 41 | + - **Name**: `@` or `thomaslbohn.com` |
| 42 | + - **Target**: `tom-bohn.github.io` |
| 43 | + - **Proxy status**: DNS only (gray cloud) - **Important**: Disable proxy for GitHub Pages |
| 44 | + - **TTL**: Auto |
| 45 | + |
| 46 | + **For www Subdomain (www.thomaslbohn.com):** |
| 47 | + - Add a **CNAME** record: |
| 48 | + - **Name**: `www` |
| 49 | + - **Target**: `tom-bohn.github.io` |
| 50 | + - **Proxy status**: DNS only (gray cloud) |
| 51 | + - **TTL**: Auto |
| 52 | + |
| 53 | + **Alternative for Apex Domain (if CNAME doesn't work):** |
| 54 | + - Add **A** records pointing to GitHub's IPs: |
| 55 | + - `185.199.108.153` |
| 56 | + - `185.199.109.153` |
| 57 | + - `185.199.110.153` |
| 58 | + - `185.199.111.153` |
| 59 | + - **Proxy status**: DNS only (gray cloud) |
| 60 | + |
| 61 | +3. Enable custom domain in GitHub repository settings: |
| 62 | + - Go to Settings > Pages |
| 63 | + - Under "Custom domain", enter `thomaslbohn.com` (or `www.thomaslbohn.com`) |
| 64 | + - Click "Save" |
| 65 | + - GitHub will automatically create/update the CNAME file |
| 66 | + - Enable "Enforce HTTPS" (may take a few minutes after DNS propagates) |
| 67 | + |
| 68 | +4. Wait for DNS propagation: |
| 69 | + - Cloudflare typically propagates quickly (5-15 minutes) |
| 70 | + - GitHub's SSL certificate may take up to 24 hours to provision |
| 71 | + - Check status in GitHub Settings > Pages |
| 72 | + |
| 73 | +### Important Cloudflare Notes: |
| 74 | +- **Always use "DNS only" (gray cloud)** for GitHub Pages - proxying through Cloudflare can cause issues |
| 75 | +- Cloudflare's CNAME flattening allows apex domains to use CNAME records |
| 76 | +- If you want to use Cloudflare's CDN/proxy features, consider using a subdomain instead |
| 77 | + |
| 78 | +## GitHub Pages Settings |
| 79 | + |
| 80 | +1. Go to your repository Settings |
| 81 | +2. Navigate to Pages |
| 82 | +3. Source should be set to "GitHub Actions" (automatic deployment) |
| 83 | +4. Custom domain can be configured here as well |
0 commit comments