-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (43 loc) · 1.23 KB
/
deploy.yml
File metadata and controls
50 lines (43 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Deploy to GitHub Pages
on:
push:
branches:
- main
permissions:
contents: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install dependencies
run: npm ci
- name: Build React app
run: npm run build
- name: Debug — show build output
run: |
echo "PWD: $(pwd)"
echo "Repo root listing:"
ls -la
echo
if [ -d ./dist ]; then
echo ">>> build directory exists — listing first 200 files"
find ./dist -type f | sed -n '1,200p'
echo "Sizes:"
du -sh ./dist || true
else
echo "ERROR: build directory not found at ./dist"
echo "Hint: if you use Vite, Next, or custom scripts the output dir might be 'dist' or 'out'."
exit 1
fi
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./dist