From 51ce37df081f374736e30e596cb30c8d3c8b87eb Mon Sep 17 00:00:00 2001 From: opheliagame <21999998+opheliagame@users.noreply.github.com> Date: Wed, 20 Mar 2024 14:16:50 +0530 Subject: [PATCH] frontend: deploy setup --- .github/workflows/deploy-gh-pages.yml | 35 +++++++++++++++++++++++++++ frontend/vite.config.js | 1 + 2 files changed, 36 insertions(+) create mode 100644 .github/workflows/deploy-gh-pages.yml diff --git a/.github/workflows/deploy-gh-pages.yml b/.github/workflows/deploy-gh-pages.yml new file mode 100644 index 0000000..aad39af --- /dev/null +++ b/.github/workflows/deploy-gh-pages.yml @@ -0,0 +1,35 @@ +name: Deploy to GH Pages + +on: + push: + branches: + - main + workflow_dispatch: + + +jobs: + build-deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout 🛎️ + uses: actions/checkout@master + with: + persist-credentials: false + + - name: Install 🔧 + working-directory: ./frontend + run: npm i + + - name: Build 🏗️ + working-directory: ./frontend + run: npm run build + env: + NODE_ENV: production + + - name: Deploy to GH Pages 🚀 + if: ${{ github.event_name != 'pull_request' }} + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: frontend/dist \ No newline at end of file diff --git a/frontend/vite.config.js b/frontend/vite.config.js index e07e5bb..f50d620 100644 --- a/frontend/vite.config.js +++ b/frontend/vite.config.js @@ -6,6 +6,7 @@ import vueJsx from '@vitejs/plugin-vue-jsx' // https://vitejs.dev/config/ export default defineConfig({ + base: '/supercut-x-padma/', plugins: [ vue(), vueJsx(),