Skip to content

Commit

Permalink
Merge pull request #1929 from nellh/web-validator-ci
Browse files Browse the repository at this point in the history
ci: Replace web validator with schema version and link to subdirectory build of the legacy validator
  • Loading branch information
rwblair authored Apr 22, 2024
2 parents 44147eb + f810718 commit 3687c71
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ jobs:
name: Clean and remove bids-validator files
command: git reset . && git clean --force -d --exclude bids-validator-web/out
- run:
name: Move build into root directory
command: mv bids-validator-web/out/* .
name: Move build into legacy directory
command: mv bids-validator-web/out/ legacy
- run:
name: Remove files not related to build
command: rm -r bids-validator bids-validator-web node_modules
Expand All @@ -200,14 +200,14 @@ jobs:
- run: git status
- run:
name: Commit updates
command: git add . && git commit --allow-empty --no-verify -m "Circle CI - Generate validator demo with version $CIRCLE_TAG [ci skip]"
command: git add legacy && git commit --allow-empty --no-verify -m "Circle CI - Generate validator demo with version $CIRCLE_TAG [ci skip]"
- run: git push origin gh-pages -f
- save_cache:
key: npm-deps-{{ checksum "package.json" }}-{{ checksum "./bids-validator/package.json" }}-{{ checksum "./bids-validator-web/package.json" }}-v1
paths:
- ./node_modules
- store_artifacts:
path: ~/
path: ~/legacy
workflows:
version: 2
build-deploy:
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/schema_web_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Schema validator web deploy

on:
push:
branches: [master]
tags: ['*']
pull_request:
branches: [master]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- run: deno task build
working-directory: ./web
- uses: actions/upload-artifact@v4
with:
name: web
path: web/dist
41 changes: 41 additions & 0 deletions .github/workflows/schema_web_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
name: Schema validator web deploy

on:
release:
types: [published]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- run: deno task build
working-directory: ./web
- uses: actions/upload-artifact@v4
with:
name: web
path: web/dist
deploy:
needs: build
permissions:
contents: read
pages: write
id-token: write
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action
1 change: 1 addition & 0 deletions web/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ function App() {
Note: Selecting a dataset only performs validation. Files are never
uploaded.
</div>
<div>Previous version of the BIDS validator (non-schema) available <a href="https://bids-standard.github.io/bids-validator/legacy">here.</a></div>
</>
)
}
Expand Down

0 comments on commit 3687c71

Please sign in to comment.