From dedff7735472b06552a4b9fa93035bfb2cba4ec2 Mon Sep 17 00:00:00 2001 From: Nell Hardcastle Date: Thu, 11 Apr 2024 12:58:03 -0700 Subject: [PATCH 1/5] fix: Push legacy validator to separate pages repo --- .circleci/config.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 458a16985..e00727c7d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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 @@ -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: @@ -256,8 +256,3 @@ workflows: - test - test_docker - githubPagesTest - filters: - branches: - ignore: /.*/ - tags: - only: /v\d+\.\d+\.\d+$/ From 2db55dc4a956ad83a837a8b42812ed7c6d7fc0f5 Mon Sep 17 00:00:00 2001 From: Nell Hardcastle Date: Fri, 12 Apr 2024 10:29:53 -0700 Subject: [PATCH 2/5] feat: Add web build workflow for schema validator --- .github/workflows/schema_web.yml | 44 ++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/schema_web.yml diff --git a/.github/workflows/schema_web.yml b/.github/workflows/schema_web.yml new file mode 100644 index 000000000..921978978 --- /dev/null +++ b/.github/workflows/schema_web.yml @@ -0,0 +1,44 @@ +--- +name: Deno web build + +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 + 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 From dcb86652e585cdb82f8a09a5d57a8767c7fe1818 Mon Sep 17 00:00:00 2001 From: Nell Hardcastle Date: Thu, 18 Apr 2024 09:10:28 -0700 Subject: [PATCH 3/5] ci: Split schema validator web build into build test and deploy workflow --- .github/workflows/schema_web_build.yml | 28 +++++++++++++++++++ .../{schema_web.yml => schema_web_deploy.yml} | 9 ++---- 2 files changed, 31 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/schema_web_build.yml rename .github/workflows/{schema_web.yml => schema_web_deploy.yml} (89%) diff --git a/.github/workflows/schema_web_build.yml b/.github/workflows/schema_web_build.yml new file mode 100644 index 000000000..aa98d429c --- /dev/null +++ b/.github/workflows/schema_web_build.yml @@ -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 diff --git a/.github/workflows/schema_web.yml b/.github/workflows/schema_web_deploy.yml similarity index 89% rename from .github/workflows/schema_web.yml rename to .github/workflows/schema_web_deploy.yml index 921978978..d6d0cee6b 100644 --- a/.github/workflows/schema_web.yml +++ b/.github/workflows/schema_web_deploy.yml @@ -1,12 +1,9 @@ --- -name: Deno web build +name: Schema validator web deploy on: - push: - branches: [master] - tags: ['*'] - pull_request: - branches: [master] + release: + types: [published] concurrency: group: ${{ github.workflow }}-${{ github.ref }} From 9f34972c7d4788482069791aed5ea08c7fae3d5e Mon Sep 17 00:00:00 2001 From: Nell Hardcastle Date: Thu, 18 Apr 2024 09:15:14 -0700 Subject: [PATCH 4/5] fix: Link to the legacy bids-validator --- web/src/App.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/web/src/App.tsx b/web/src/App.tsx index d87d148f5..24034f31c 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -95,6 +95,7 @@ function App() { Note: Selecting a dataset only performs validation. Files are never uploaded. +
Previous version of the BIDS validator (non-schema) available here.
) } From f8107181164ae2bdbfcfad239469ac03b1864d06 Mon Sep 17 00:00:00 2001 From: Nell Hardcastle Date: Thu, 18 Apr 2024 09:20:14 -0700 Subject: [PATCH 5/5] fix: Restore the release filter for legacy validator github pages deploy --- .circleci/config.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index e00727c7d..cf21b555b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -256,3 +256,8 @@ workflows: - test - test_docker - githubPagesTest + filters: + branches: + ignore: /.*/ + tags: + only: /v\d+\.\d+\.\d+$/