Skip to content

Commit f819220

Browse files
ryan-williamsclaude
andcommitted
Consolidate www workflows: lint → build → e2e → deploy
Merge deploy.yml and e2e-tests.yml into single www-ci.yml workflow: - Single Node/pnpm setup (was duplicated) - Runs lint, build, E2E tests in sequence - Deploy only happens on main AND after E2E tests pass - Upload playwright report on test failure 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 7b8e5d4 commit f819220

File tree

3 files changed

+85
-96
lines changed

3 files changed

+85
-96
lines changed

.github/workflows/deploy.yml

Lines changed: 0 additions & 50 deletions
This file was deleted.

.github/workflows/e2e-tests.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

.github/workflows/www-ci.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: WWW CI & Deploy
2+
on:
3+
push:
4+
branches: [main]
5+
paths: ['www/**', '.github/workflows/www-ci.yml']
6+
pull_request:
7+
branches: [main]
8+
paths: ['www/**', '.github/workflows/www-ci.yml']
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
concurrency:
17+
group: "pages"
18+
cancel-in-progress: false
19+
20+
jobs:
21+
build-and-test:
22+
runs-on: ubuntu-latest
23+
timeout-minutes: 10
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- uses: pnpm/action-setup@v4
28+
with:
29+
version: 10
30+
31+
- uses: actions/setup-node@v4
32+
with:
33+
node-version: '20'
34+
cache: 'pnpm'
35+
cache-dependency-path: 'www/pnpm-lock.yaml'
36+
37+
- name: Install dependencies
38+
working-directory: ./www
39+
run: pnpm install
40+
41+
- name: Lint
42+
working-directory: ./www
43+
run: pnpm run lint
44+
45+
- name: Build
46+
working-directory: ./www
47+
run: pnpm run build
48+
49+
- name: Install Playwright browsers
50+
working-directory: ./www
51+
run: pnpm exec playwright install --with-deps chromium
52+
53+
- name: Run E2E tests
54+
working-directory: ./www
55+
run: pnpm run test:e2e
56+
57+
- name: Upload test report
58+
if: failure()
59+
uses: actions/upload-artifact@v4
60+
with:
61+
name: playwright-report
62+
path: www/playwright-report/
63+
retention-days: 7
64+
65+
- name: Setup Pages
66+
if: github.ref == 'refs/heads/main'
67+
uses: actions/configure-pages@v5
68+
69+
- name: Upload Pages artifact
70+
if: github.ref == 'refs/heads/main'
71+
uses: actions/upload-pages-artifact@v3
72+
with:
73+
path: ./www/dist
74+
75+
deploy:
76+
runs-on: ubuntu-latest
77+
needs: build-and-test
78+
if: github.ref == 'refs/heads/main'
79+
environment:
80+
name: github-pages
81+
url: ${{ steps.deployment.outputs.page_url }}
82+
steps:
83+
- name: Deploy to GitHub Pages
84+
id: deployment
85+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)