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
6 changes: 6 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ on:
push:
branches:
- main

pull_request:

workflow_call:

jobs:
lint:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -94,5 +97,8 @@ jobs:
- name: Install dependencies
run: pnpm playwright install chromium chromium-headless-shell

- name: Build Demo
run: pnpm turbo run build --filter="@istex/viewer-demo"

- name: Run Tests
run: pnpm turbo run e2e
54 changes: 54 additions & 0 deletions .github/workflows/deloy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Deploy Demo to GitHub Pages

on:
push:
branches: ["main"]

workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
check:
uses: ./.github/workflows/check.yml@main

deploy:
runs-on: ubuntu-latest
needs:
- check
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Pages
uses: actions/configure-pages@v5

- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: '24.x'

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build Demo
run: pnpm turbo run build --filter="@istex/viewer-demo" --no-cache

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './packages/demo/dist'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"[typescriptreact]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[yaml]": {
"editor.defaultFormatter": "biomejs.biome"
},
"files.exclude": {
"**/.DS_Store": true,
"**/.turbo": true,
Expand Down
1 change: 1 addition & 0 deletions packages/demo/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import vitePluginDevtoolsJson from "vite-plugin-devtools-json";
import viteTsConfigPaths from "vite-tsconfig-paths";

const config = defineConfig({
base: "/istex-view/",
server: {
port: 3000,
},
Expand Down
6 changes: 3 additions & 3 deletions packages/e2e/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ const command = process.env.DEV
? 'pnpm turbo run --filter="@istex/viewer-demo" dev'
: 'pnpm turbo run --filter="@istex/viewer-demo" preview';
const baseURL = process.env.DEV
? "http://localhost:3000"
: "http://localhost:8000";
? "http://localhost:3000/istex-view"
: "http://localhost:8000/istex-view";

export default defineConfig({
testDir: "./src",
Expand All @@ -28,7 +28,7 @@ export default defineConfig({

webServer: {
command,
url: baseURL,
url: `${baseURL}/`,
reuseExistingServer: !process.env.CI,
},
});
1 change: 1 addition & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
packages:
- packages/*

catalogMode: prefer
catalog:
'@biomejs/biome': ^2.3.8
'@emotion/react': ^11.14.0
Expand Down