Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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/*'
10 changes: 5 additions & 5 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
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({
plugins: [react(), tailwindcss(), mkcert()],
server: {
port: 5173,
},
base: process.env.NODE_ENV === 'production' ? '/example/' : '/',
base: process.env.NODE_ENV === "production" ? "/airkit-example/" : "/",
});