Skip to content

Commit bb284ed

Browse files
jsfleddclaude
andcommitted
Restructure workflow to match official Vite documentation
Based on official Vite docs and working examples, restructured workflow to: - Use single deploy job instead of separate build/deploy jobs - Add missing actions/configure-pages@v5 step - Upgrade to Node 20 LTS - Use npm ci as recommended - Update to latest action versions This matches the proven pattern from vite.dev/guide/static-deploy 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 2f124db commit bb284ed

1 file changed

Lines changed: 15 additions & 22 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,46 +12,39 @@ permissions:
1212
id-token: write
1313

1414
concurrency:
15-
group: "pages"
16-
cancel-in-progress: false
15+
group: 'pages'
16+
cancel-in-progress: true
1717

1818
jobs:
19-
build:
19+
deploy:
20+
environment:
21+
name: github-pages
22+
url: ${{ steps.deployment.outputs.page_url }}
2023
runs-on: ubuntu-latest
2124
steps:
2225
- name: Checkout
2326
uses: actions/checkout@v4
2427

25-
- name: Setup Node
28+
- name: Set up Node
2629
uses: actions/setup-node@v4
2730
with:
28-
node-version: '18'
31+
node-version: '20'
2932
cache: 'npm'
3033

3134
- name: Install dependencies
32-
run: npm install
33-
34-
- name: Verify vite installation
35-
run: |
36-
echo "Checking for vite..."
37-
ls -la node_modules/vite/bin/ || echo "vite bin directory not found"
38-
test -f node_modules/vite/bin/vite.js && echo "vite.js exists" || echo "vite.js NOT found"
35+
run: npm ci
3936

4037
- name: Build
41-
run: npx --yes vite build
38+
run: npm run build:ci
39+
40+
- name: Setup Pages
41+
uses: actions/configure-pages@v5
4242

4343
- name: Upload artifact
44-
uses: actions/upload-pages-artifact@v3
44+
uses: actions/upload-pages-artifact@v4
4545
with:
46-
path: ./dist
46+
path: './dist'
4747

48-
deploy:
49-
environment:
50-
name: github-pages
51-
url: ${{ steps.deployment.outputs.page_url }}
52-
runs-on: ubuntu-latest
53-
needs: build
54-
steps:
5548
- name: Deploy to GitHub Pages
5649
id: deployment
5750
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)