diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8ba31cf..aa86de1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,25 +1,28 @@ -name: Frontend CI +name: CI on: push: - branches: [main] + branches: + - main pull_request: - branches: [main] + branches: + - main jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v5 with: node-version: 24 cache: npm cache-dependency-path: package-lock.json - - run: npm ci + - name: Install dependencies + run: npm ci - name: Lint run: npm run lint @@ -33,4 +36,13 @@ jobs: - name: Build run: npm run build env: - VITE_API_BASE_URL: ${{ vars.VITE_API_BASE_URL }} \ No newline at end of file + VITE_API_BASE_URL: ${{ vars.VITE_API_BASE_URL }} + + deploy: + needs: build + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + runs-on: ubuntu-latest + + steps: + - name: Deploy to Vercel + run: curl -X POST "${{ secrets.VERCEL_DEPLOY_HOOK }}" diff --git a/vercel.json b/vercel.json new file mode 100644 index 0000000..3d5f985 --- /dev/null +++ b/vercel.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://openapi.vercel.sh/vercel.json", + "rewrites": [ + { + "source": "/(.*)", + "destination": "/index.html" + } + ], + "git": { + "deploymentEnabled": false + } +}