Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Deploy SvelteKit to GitHub Pages
on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
contents: read
Expand Down Expand Up @@ -31,17 +33,28 @@ jobs:
- name: Install dependencies
run: npm ci # install dependencies using lock file

- name: Audit dependencies
run: npm audit

- name: Install Playwright browsers
run: npx playwright install --with-deps chromium

- name: Run tests
run: npm test

# Build the SvelteKit project
- name: Build project
run: npm run build

# Upload build output as artifact
- uses: actions/upload-pages-artifact@v5
if: github.event_name == 'push'
with:
path: ./build # SvelteKit static output folder

deploy:
needs: build # make the build artifact available here in deploy job
if: github.event_name == 'push'
runs-on: ubuntu-latest

environment:
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ There are automated tests using Playwright.

- run this the first time, to install Playwright dependencies: `npx playwright install`
- `npm run test` to run tests
- the test script will start a local web server


## Production build
Expand Down
10 changes: 5 additions & 5 deletions playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { defineConfig } from '@playwright/test';

export default defineConfig({
// webServer: {
// command: 'npm run build && npm run preview',
// port: 4173
// },
webServer: {
command: 'npm run dev -- --host 127.0.0.1',
port: 5173
},
use: {
baseURL: "http://localhost:5173"
baseURL: "http://127.0.0.1:5173"
},
testDir: 'e2e'
});
Loading