Skip to content

Commit 36b5ea2

Browse files
committed
Fix GitHub Pages deployment configuration
1 parent 1c4436c commit 36b5ea2

File tree

2 files changed

+90
-24
lines changed

2 files changed

+90
-24
lines changed

.github/workflows/deploy.yml

Lines changed: 43 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,51 @@ name: Deploy to GitHub Pages
33
on:
44
push:
55
branches: [ main ]
6-
pull_request:
7-
branches: [ main ]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: false
816

917
jobs:
10-
build-and-deploy:
18+
build:
1119
runs-on: ubuntu-latest
12-
1320
steps:
14-
- name: Checkout
15-
uses: actions/checkout@v4
16-
17-
- name: Setup Node.js
18-
uses: actions/setup-node@v4
19-
with:
20-
node-version: '18'
21-
cache: 'npm'
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: '18'
28+
cache: 'npm'
29+
30+
- name: Install dependencies
31+
run: npm ci
32+
33+
- name: Build static site
34+
run: npm run build
2235

23-
- name: Install dependencies
24-
run: npm ci
25-
26-
- name: Build static site
27-
run: npm run build
28-
29-
- name: Deploy to GitHub Pages
30-
uses: peaceiris/actions-gh-pages@v3
31-
if: github.ref == 'refs/heads/main'
32-
with:
33-
github_token: ${{ secrets.GITHUB_TOKEN }}
34-
publish_dir: ./out
36+
- name: Setup Pages
37+
uses: actions/configure-pages@v4
38+
39+
- name: Upload artifact
40+
uses: actions/upload-pages-artifact@v3
41+
with:
42+
path: ./out
43+
44+
deploy:
45+
environment:
46+
name: github-pages
47+
url: ${{ steps.deployment.outputs.page_url }}
48+
runs-on: ubuntu-latest
49+
needs: build
50+
steps:
51+
- name: Deploy to GitHub Pages
52+
id: deployment
53+
uses: actions/deploy-pages@v4

setup-github-pages.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# GitHub Pages Setup Guide
2+
3+
## Step 1: Enable GitHub Pages in Repository Settings
4+
5+
1. Go to your repository: `https://github.com/[your-username]/Just-Curieous.github.io`
6+
2. Click on **Settings** tab
7+
3. Scroll down to **Pages** in the left sidebar
8+
4. Under **Source**, select **GitHub Actions**
9+
5. Click **Save**
10+
11+
## Step 2: Push Your Code
12+
13+
Make sure all your changes are committed and pushed:
14+
15+
```bash
16+
git add .
17+
git commit -m "Configure GitHub Pages deployment"
18+
git push origin main
19+
```
20+
21+
## Step 3: Check GitHub Actions
22+
23+
1. Go to **Actions** tab in your repository
24+
2. You should see "Deploy to GitHub Pages" workflow running
25+
3. Wait for it to complete successfully
26+
27+
## Step 4: Access Your Site
28+
29+
Once deployment is complete, your site will be available at:
30+
`https://[your-username].github.io/Just-Curieous.github.io/`
31+
32+
## Troubleshooting
33+
34+
### If Actions fail:
35+
1. Check the Actions tab for error messages
36+
2. Ensure all files are committed
37+
3. Verify the workflow file is in `.github/workflows/deploy.yml`
38+
39+
### If site doesn't load:
40+
1. Wait 5-10 minutes for DNS propagation
41+
2. Check if the deployment completed successfully
42+
3. Verify the URL matches your repository name exactly
43+
44+
### Common Issues:
45+
- Repository name must match exactly: `Just-Curieous.github.io`
46+
- Main branch must be named `main` (not `master`)
47+
- All dependencies must be in `package.json`

0 commit comments

Comments
 (0)