Skip to content

Commit

Permalink
Test ci changes
Browse files Browse the repository at this point in the history
  • Loading branch information
repalash committed Feb 3, 2024
1 parent c392e29 commit 1ccb824
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,13 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: '**/package-lock.json' # https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-data
# cache: 'npm'
# cache-dependency-path: '**/package-lock.json' # https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-data
- run: npm ci # this will also run `npm run prepare` which will build
- run: npm run docs
- run: npm run docs-all
- run: mkdir _site
- run: mv -t _site src docs dist examples README.md LICENSE index.html
- run: mkdir -p _site/plugins
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
"serve-docs": "ws -d docs -p 8080",
"serve": "ws -d . -p 9229",
"docs": "npx typedoc && markdown-to-html",
"build-plugins": "node scripts/build-plugins.mjs",
"docs-plugins": "node scripts/each-plugin.mjs run docs",
"docs-all": "npm run docs && npm run docs-plugins",
"build-plugins": "node scripts/each-plugin.mjs ci",
"prepare": "npm run build && npm run compile && npm run build-plugins && npm run build-examples",
"update-version": "echo \"export const VERSION = '$npm_package_version'\" > src/viewer/version.ts"
},
Expand Down
8 changes: 8 additions & 0 deletions scripts/each-plugin.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import {execEachPlugin} from "./utils.mjs";

const command = process.argv.slice(2).join(' ')
if(!command) throw new Error('Command is required')
console.log(`Executing '${command}' in all plugins`)

// Each plugin should have "prepare" that will also build the plugin
execEachPlugin(`npm ${command}}`) // install dependencies

0 comments on commit 1ccb824

Please sign in to comment.