From c23264be0d6abf64b12eeb9fd5a6a8d644a99c7a Mon Sep 17 00:00:00 2001 From: Heberto Mayorquin Date: Thu, 25 Apr 2024 14:04:49 -0600 Subject: [PATCH] add deploy of the page --- .github/workflows/deploy.yml | 33 +++++++++++++++++++++++++++++++++ src/components/App.js | 5 ++--- 2 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..7b67623 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,33 @@ +name: Build and Deploy to GitHub Pages + +on: + push: + branches: + - main # Set this to your default branch + +concurrency: # Cancel previous workflows on the same pull request + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: latest # Set this to the node version you are using + + - name: Install Dependencies + run: npm install + + - name: Build + run: npm run build + + - name: Deploy + uses: JamesIves/github-pages-deploy-action@releases/v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + branch: gh-pages # The branch the action should deploy to. + folder: build # The folder the action should deploy. diff --git a/src/components/App.js b/src/components/App.js index 5f2cf44..7363226 100644 --- a/src/components/App.js +++ b/src/components/App.js @@ -6,9 +6,8 @@ import RowPlotContainer from "./RowPlotContainer"; import "../styles/App.css"; function App() { - // const url = "https://spikeinterface-template-database.s3.us-east-2.amazonaws.com/test_templates"; - const url = "http://localhost:8000/zarr_store.zarr"; - // const url = "/zarr_store.zarr" + const url = "https://spikeinterface-template-database.s3.us-east-2.amazonaws.com/test_templates"; + //const url = "http://localhost:8000/zarr_store.zarr"; const storeRef = new HTTPStore(url); const [selectedTemplates, setSelectedTemplates] = useState(new Set()); // Updated to useState const [templateIndices, setTemplateIndices] = useState([]);