diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml new file mode 100644 index 0000000..037f624 --- /dev/null +++ b/.github/workflows/build_and_deploy.yml @@ -0,0 +1,28 @@ +name: Build and Deploy +on: + push: + branches: + - main + workflow_dispatch: +permissions: + contents: write +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout 🛎️ + uses: actions/checkout@v3.3.0 + with: + persist-credentials: false + + - name: Install and Build 🔧 + run: | + npm install + npm run build + - name: Deploy 🚀 + uses: JamesIves/github-pages-deploy-action@v4.4.1 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH: gh-pages + FOLDER: dist + CLEAN: true 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);