diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9c0ee55..2a8b330 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,9 +2,7 @@ name: Build, Test and Deploy AIRKit Example Site on: push: - branches: ['main'] - pull_request: - branches: ['main'] + branches: ["main", "fix/skip-deploy-with-pr"] workflow_dispatch: concurrency: @@ -25,9 +23,9 @@ jobs: - name: Set up node uses: actions/setup-node@v4 with: - node-version: '22' - cache: 'npm' - registry-url: 'https://registry.npmjs.org' + node-version: "22" + cache: "npm" + registry-url: "https://registry.npmjs.org" - name: Install dependencies run: npm ci @@ -48,7 +46,7 @@ jobs: deploy: needs: build-and-test - if: github.ref == 'refs/heads/main' && github.event_name == 'push' + # if: github.ref == 'refs/heads/main' && github.event_name == 'push' runs-on: ubuntu-latest environment: main permissions: @@ -70,8 +68,8 @@ jobs: - name: Sync S3 run: | - aws s3 sync ./dist s3://${{ vars.AIR_EXAMPLE_BUCKET_NAME }} + aws s3 sync ./dist s3://${{ vars.AIR_EXAMPLE_BUCKET_NAME }}/airkit-example - name: Invalidate CloudFront cache run: | - aws cloudfront create-invalidation --distribution-id ${{ vars.AIR_EXAMPLE_CLOUDFRONT_DISTRIBUTION_ID }} --paths '/*' + aws cloudfront create-invalidation --distribution-id ${{ vars.AIR_EXAMPLE_CLOUDFRONT_DISTRIBUTION_ID }} --paths '/airkit-example/*' diff --git a/vite.config.ts b/vite.config.ts index d03cfeb..384f0a1 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,7 +1,7 @@ -import { defineConfig } from 'vite'; -import react from '@vitejs/plugin-react'; -import tailwindcss from '@tailwindcss/vite'; -import mkcert from 'vite-plugin-mkcert'; +import { defineConfig } from "vite"; +import react from "@vitejs/plugin-react"; +import tailwindcss from "@tailwindcss/vite"; +import mkcert from "vite-plugin-mkcert"; // https://vite.dev/config/ export default defineConfig({ @@ -9,5 +9,5 @@ export default defineConfig({ server: { port: 5173, }, - base: process.env.NODE_ENV === 'production' ? '/example/' : '/', + base: process.env.NODE_ENV === "production" ? "/airkit-example/" : "/", });