Skip to content

Commit 3dd4281

Browse files
author
Lysandre Costes
committed
Fix GitHub Pages deploy (gh-pages branch)
1 parent dd42b2b commit 3dd4281

2 files changed

Lines changed: 16 additions & 18 deletions

File tree

.github/workflows/deploy-pages.yml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ on:
66
workflow_dispatch:
77

88
permissions:
9-
contents: read
10-
pages: write
11-
id-token: write
9+
contents: write
1210

1311
concurrency:
1412
group: pages
@@ -17,17 +15,12 @@ concurrency:
1715
jobs:
1816
deploy:
1917
runs-on: ubuntu-latest
20-
environment:
21-
name: github-pages
22-
url: ${{ steps.deployment.outputs.page_url }}
2318
steps:
2419
- uses: actions/checkout@v4
2520

26-
- uses: actions/configure-pages@v4
27-
28-
- uses: actions/upload-pages-artifact@v3
21+
- name: Publish website/ to gh-pages branch
22+
uses: peaceiris/actions-gh-pages@v4
2923
with:
30-
path: website
31-
32-
- id: deployment
33-
uses: actions/deploy-pages@v4
24+
github_token: ${{ secrets.GITHUB_TOKEN }}
25+
publish_dir: ./website
26+
publish_branch: gh-pages

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,17 @@ No build step. D3, Three.js, and fonts are loaded from CDNs in `index.html`.
2222

2323
### GitHub Pages
2424

25-
The site is hosted on GitHub Pages.
25+
Live site: [com-480-data-visualization.github.io/com-480-project-pff](https://com-480-data-visualization.github.io/com-480-project-pff/)
2626

27-
1. Push to `main` (workflow in `.github/workflows/deploy-pages.yml` publishes the `website/` folder).
28-
2. On GitHub: **Settings → Pages → Build and deployment → Source** → choose **GitHub Actions**.
29-
3. After the workflow succeeds, open
30-
**[https://com-480-data-visualization.github.io/com-480-project-pff/](https://com-480-data-visualization.github.io/com-480-project-pff/)**
27+
**One-time setup** (repo admin):
28+
29+
1. **Settings → Pages → Build and deployment**
30+
2. **Source:** Deploy from a branch
31+
3. **Branch:** `gh-pages` · folder **`/ (root)`** → Save
32+
33+
Each push to `main` runs the workflow and updates the `gh-pages` branch from `website/` (Three.js, D3, and JSON included). If the workflow failed before with *Get Pages site failed*, that was because Pages was not enabled yet — the steps above fix it.
34+
35+
**Re-deploy manually:** Actions → *Deploy website to GitHub Pages**Run workflow*
3136

3237
---
3338

0 commit comments

Comments
 (0)