From e888c6b0682207984a59ee03e52feb8fc9e26da3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Poullet-Pag=C3=A8s?= Date: Sun, 21 Apr 2024 16:40:05 +0200 Subject: [PATCH] deploy to gh pages --- .github/workflows/vite.yml | 43 ++++++++++++++++++++++++++++++++++++++ vite.config.js | 2 +- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/vite.yml diff --git a/.github/workflows/vite.yml b/.github/workflows/vite.yml new file mode 100644 index 00000000..b67c7530 --- /dev/null +++ b/.github/workflows/vite.yml @@ -0,0 +1,43 @@ +name: Deploy + +on: + push: + branches: ['midi-player'] + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: 'pages' + cancel-in-progress: true + +jobs: + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Set up Node + uses: actions/setup-node@v3 + with: + node-version: 18 + cache: 'yarn' + - name: Install dependencies + run: yarn install + - name: Build + run: yarn build + - name: Setup Pages + uses: actions/configure-pages@v3 + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + # Upload dist repository + path: './tonalities' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v1 \ No newline at end of file diff --git a/vite.config.js b/vite.config.js index cd9cda27..04cbd80c 100644 --- a/vite.config.js +++ b/vite.config.js @@ -2,7 +2,7 @@ import { defineConfig } from 'vite' import react from '@vitejs/plugin-react-swc' export default defineConfig({ - base: '/tonalities/', + base: '/sherlock-tonalities/', server: { open: true, },