From e83400398484c5353f4a4161e585dd405e086f48 Mon Sep 17 00:00:00 2001 From: Josh Moore Date: Fri, 10 Mar 2023 14:50:47 +0100 Subject: [PATCH 1/4] Copy GHA from ome-ngff-validator --- .github/workflows/build_and_deploy.yml | 27 ++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/build_and_deploy.yml diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml new file mode 100644 index 0000000..0547a80 --- /dev/null +++ b/.github/workflows/build_and_deploy.yml @@ -0,0 +1,27 @@ +name: Build and Deploy +on: + push: + branches: + - main + workflow_dispatch: +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout 🛎️ + uses: actions/checkout@v2.3.1 + with: + persist-credentials: false + + - name: Install and Build 🔧 + run: | + npm install + npm run build + - name: Deploy 🚀 + uses: JamesIves/github-pages-deploy-action@3.7.1 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH: gh-pages + FOLDER: dist + CLEAN: true + # CLEAN_EXCLUDE: '["v0.1", "v0.2", "v0.3"]' # Manually add endpoints to keep From c1f4689241708e4b3f35bcfd5abd615cf6ffd681 Mon Sep 17 00:00:00 2001 From: Josh Moore Date: Fri, 10 Mar 2023 15:36:05 +0100 Subject: [PATCH 2/4] Update actions to hopefully fix build --- .github/workflows/build_and_deploy.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index 0547a80..03426d4 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout 🛎️ - uses: actions/checkout@v2.3.1 + uses: actions/checkout@v3.3.0 with: persist-credentials: false @@ -18,10 +18,9 @@ jobs: npm install npm run build - name: Deploy 🚀 - uses: JamesIves/github-pages-deploy-action@3.7.1 + uses: JamesIves/github-pages-deploy-action@v4.4.1 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} BRANCH: gh-pages FOLDER: dist CLEAN: true - # CLEAN_EXCLUDE: '["v0.1", "v0.2", "v0.3"]' # Manually add endpoints to keep From 7c7404418acf206c77c852ea7ae7c3d0632ea2f1 Mon Sep 17 00:00:00 2001 From: Josh Moore Date: Fri, 10 Mar 2023 15:40:52 +0100 Subject: [PATCH 3/4] Grant write permissions to the GHA --- .github/workflows/build_and_deploy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index 03426d4..037f624 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -4,6 +4,8 @@ on: branches: - main workflow_dispatch: +permissions: + contents: write jobs: build-and-deploy: runs-on: ubuntu-latest From 72221564d931f2a2107817136c5c0146949f9fde Mon Sep 17 00:00:00 2001 From: Will Moore Date: Fri, 10 Mar 2023 14:50:27 +0000 Subject: [PATCH 4/4] fix ome-zarr-catalog in vite.config.js --- vite.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vite.config.js b/vite.config.js index d74e089..4b46db5 100644 --- a/vite.config.js +++ b/vite.config.js @@ -7,7 +7,7 @@ let config = { }; // this will be undefined when deployed from netlify, but is used by gh-pages if (process.env.GITHUB_REPOSITORY_OWNER) { - config.base = `https://${process.env.GITHUB_REPOSITORY_OWNER}.github.io/ome-ngff-validator/`; + config.base = `https://${process.env.GITHUB_REPOSITORY_OWNER}.github.io/ome-zarr-catalog/`; } export default defineConfig(config);