Skip to content

Commit f8eeb68

Browse files
authored
Merge pull request #2060 from nellh/bids-validator-build-fixes
ci: Include legacy validator build in deno web deployment
2 parents ccd68ae + 53d7b32 commit f8eeb68

File tree

4 files changed

+14
-61
lines changed

4 files changed

+14
-61
lines changed

.circleci/config.yml

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -75,54 +75,6 @@ jobs:
7575
- ./.next/cache
7676
- store_artifacts:
7777
path: ~/web_version
78-
gh-pages_deployment:
79-
docker:
80-
- image: node:18-alpine
81-
steps:
82-
- run: npm install --global npm
83-
- run: apk --no-cache add ca-certificates git openssh-client
84-
- add_ssh_keys:
85-
fingerprints:
86-
- '86:74:77:4c:90:02:f4:5d:b4:f8:3c:b4:37:c3:c0:25'
87-
- checkout
88-
- restore_cache:
89-
keys:
90-
- npm-deps-{{ checksum "package.json" }}-{{ checksum "./bids-validator/package.json" }}-{{ checksum "./bids-validator-web/package.json" }}-v1
91-
- run: git config --global user.email "bids.maintenance@gmail.com"
92-
- run: git config --global user.name "bids-maintenance"
93-
- run: ssh-keyscan github.com >> ~/.ssh/known_hosts
94-
- run:
95-
name: Create new gh-pages branch without history
96-
command: git checkout --orphan gh-pages
97-
- run:
98-
name: Install bids-validator and bids-validator-web dependencies
99-
command: npm install
100-
- run:
101-
name: Build and export web-validator
102-
command: npm run web-export
103-
- run:
104-
name: Clean and remove bids-validator files
105-
command: git reset . && git clean --force -d --exclude bids-validator-web/out
106-
- run:
107-
name: Move build into legacy directory
108-
command: mv bids-validator-web/out/ legacy
109-
- run:
110-
name: Remove files not related to build
111-
command: rm -r bids-validator bids-validator-web node_modules
112-
- run:
113-
name: Create a nojekyll file (gh-pages specific)
114-
command: touch .nojekyll
115-
- run: git status
116-
- run:
117-
name: Commit updates
118-
command: git add legacy && git commit --allow-empty --no-verify -m "Circle CI - Generate validator demo with version $CIRCLE_TAG [ci skip]"
119-
- run: git push origin gh-pages -f
120-
- save_cache:
121-
key: npm-deps-{{ checksum "package.json" }}-{{ checksum "./bids-validator/package.json" }}-{{ checksum "./bids-validator-web/package.json" }}-v1
122-
paths:
123-
- ./node_modules
124-
- store_artifacts:
125-
path: ~/legacy
12678
workflows:
12779
version: 2
12880
build-deploy:
@@ -145,13 +97,3 @@ workflows:
14597
only: /.*/
14698
tags:
14799
only: /.*/
148-
- gh-pages_deployment:
149-
requires:
150-
- test
151-
- test_docker
152-
- githubPagesTest
153-
filters:
154-
branches:
155-
ignore: /.*/
156-
tags:
157-
only: /v\d+\.\d+\.\d+$/

.github/workflows/schema_web_build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: Schema validator web deploy
2+
name: Schema validator web build
33

44
on:
55
push:

.github/workflows/schema_web_deploy.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,24 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v4
17+
# Use Node 18 for legacy build
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: 18
1721
- uses: denoland/setup-deno@v1
1822
with:
1923
deno-version: v1.x
2024
- run: deno task build
2125
working-directory: ./web
22-
- uses: actions/upload-artifact@v4
26+
- name: Install NPM deps
27+
run: npm install
28+
- name: Build legacy validator website
29+
run: npm run web-export
30+
- name: Move legacy validator build into deno website
31+
run: mv bids-validator-web/out web/dist/legacy
32+
- name: Upload GitHub Pages artifact
33+
uses: actions/upload-pages-artifact@v3
2334
with:
24-
name: github-pages
2535
path: web/dist
2636
deploy:
2737
needs: build

web/vite.config.mts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import "npm:react-dom@^18.2.0"
88

99
// https://vitejs.dev/config/
1010
export default defineConfig({
11+
base: '',
1112
plugins: [
1213
httpsImports.default(),
1314
react(),

0 commit comments

Comments
 (0)