From d95ea2705b7ef62eb207a3db3178b3155fbf83e9 Mon Sep 17 00:00:00 2001 From: Jose Jimenez Date: Thu, 12 Feb 2026 21:33:42 +0100 Subject: [PATCH] deploy for github actions added --- vite.config.js | 1 + workflows/deploy.yml | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 workflows/deploy.yml diff --git a/vite.config.js b/vite.config.js index 8b0f57b..4fb91a4 100644 --- a/vite.config.js +++ b/vite.config.js @@ -4,4 +4,5 @@ import react from '@vitejs/plugin-react' // https://vite.dev/config/ export default defineConfig({ plugins: [react()], + base: '/harmonica-tabs-image-app/', }) diff --git a/workflows/deploy.yml b/workflows/deploy.yml new file mode 100644 index 0000000..fae02d8 --- /dev/null +++ b/workflows/deploy.yml @@ -0,0 +1,41 @@ +name: Deploy Vite app to GitHub Pages + +on: + push: + branches: + - main + +permissions: + contents: read + pages: write + id-token: write + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 18 + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Setup Pages + uses: actions/configure-pages@v4 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: './dist' + + - name: Deploy to GitHub Pages + uses: actions/deploy-pages@v4