|
| 1 | +# GitHub Pages Deployment |
| 2 | + |
| 3 | +This repository is configured to automatically deploy to GitHub Pages at `https://ipython.github.io` (or `https://ipython.github.com` which still works). |
| 4 | + |
| 5 | +## Setup Instructions |
| 6 | + |
| 7 | +### 1. Enable GitHub Pages |
| 8 | + |
| 9 | +1. Go to your repository Settings → Pages |
| 10 | + - Or visit: `https://github.com/ipython/[this-repo]/settings/pages` |
| 11 | +2. Under "Source", select **"GitHub Actions"** (not "Deploy from a branch") |
| 12 | +3. Save the settings |
| 13 | + |
| 14 | +### 2. Deploy |
| 15 | + |
| 16 | +The workflow will automatically run on every push to the `main` branch. You can also manually trigger it: |
| 17 | + |
| 18 | +1. Go to Actions tab |
| 19 | +2. Select "Deploy to GitHub Pages" workflow |
| 20 | +3. Click "Run workflow" → "Run workflow" |
| 21 | + |
| 22 | +## How It Works |
| 23 | + |
| 24 | +The deployment workflow: |
| 25 | + |
| 26 | +1. **Builds the site** from the `main` branch |
| 27 | +2. **Uploads** the built files as an artifact |
| 28 | +3. **Deploys** to GitHub Pages (which serves from the `gh-pages` branch automatically) |
| 29 | +4. Makes the site available at `https://ipython.github.io/[repo-name]` or `https://ipython.github.com/[repo-name]` |
| 30 | + |
| 31 | +## Configuration |
| 32 | + |
| 33 | +The build uses these environment variables: |
| 34 | +- `BASE_PATH`: Set to empty string for root domain deployment |
| 35 | +- `GITHUB_REPOSITORY_OWNER`: Set to `ipython` for correct asset paths |
| 36 | + |
| 37 | +These are set automatically in the workflow. |
| 38 | + |
| 39 | +## Troubleshooting |
| 40 | + |
| 41 | +### "Permission denied" errors |
| 42 | + |
| 43 | +- Ensure GitHub Pages is enabled in repository settings |
| 44 | +- Check that the workflow has the correct permissions (should be automatic) |
| 45 | + |
| 46 | +### Build succeeds but site doesn't update |
| 47 | + |
| 48 | +- Check the Actions logs for the deploy step |
| 49 | +- Wait a few minutes for GitHub Pages to rebuild |
| 50 | +- Verify the Pages source is set to "GitHub Actions" not a branch |
| 51 | + |
| 52 | +### Site not accessible |
| 53 | + |
| 54 | +- Check repository visibility (public repos work automatically) |
| 55 | +- Verify the repository name matches the expected GitHub Pages URL pattern |
| 56 | +- For organization repos, ensure Pages is enabled at the organization level if needed |
0 commit comments