diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6a120738..e07f5355 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,14 +1,20 @@ -name: Deploy Email App +name: Deploy Apps on: push: branches: - - main # Update if your default branch is different + - main jobs: deploy: runs-on: ubuntu-latest + strategy: + matrix: + app: + - email + - core-connection + steps: - name: Checkout repository uses: actions/checkout@v3 @@ -16,22 +22,19 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v3 with: - node-version: 20 # Ensure this matches your project requirements + node-version: 20 cache: 'npm' - - name: Install dependencies + - name: Install dependencies and build run: | - cd examples/email + cd examples/${{ matrix.app }} npm install - - - name: Build Email App - run: | - cd examples/email npm run build - mkdir -p ../../gh-pages/email - cp -R dist/* ../../gh-pages/email + mkdir -p ../../gh-pages/${{ matrix.app }} + cp -R dist/* ../../gh-pages/${{ matrix.app }} - name: Deploy to GitHub Pages + if: ${{ matrix.app == 'core-connection' }} # Deploy after the last app uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/examples/core-connection/vite.config.ts b/examples/core-connection/vite.config.ts index f4ad85ab..7560b619 100644 --- a/examples/core-connection/vite.config.ts +++ b/examples/core-connection/vite.config.ts @@ -5,4 +5,5 @@ import { nodePolyfills } from 'vite-plugin-node-polyfills'; // https://vitejs.dev/config/ export default defineConfig({ plugins: [nodePolyfills({}), react()], + base: '/push-network-sdk/core-connection/', });