feat(sdk): add admin IDs to getAdminHierarchy and add governorate bou… #30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy Examples to GitHub Pages | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'examples/react/**' | |
| - 'src/**' | |
| - '.github/workflows/deploy-examples.yml' | |
| workflow_dispatch: | |
| # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| # Allow only one concurrent deployment | |
| concurrency: | |
| group: 'pages' | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| name: Build Example App | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Cache SDK dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.bun/install/cache | |
| node_modules | |
| key: ${{ runner.os }}-bun-sdk-${{ hashFiles('**/bun.lockb') }} | |
| restore-keys: | | |
| ${{ runner.os }}-bun-sdk- | |
| ${{ runner.os }}-bun- | |
| - name: Install SDK dependencies | |
| run: bun install --frozen-lockfile | |
| working-directory: . | |
| - name: Build SDK | |
| run: bun run build | |
| working-directory: . | |
| - name: Generate API docs JSON | |
| run: bun run docs:json | |
| working-directory: . | |
| - name: Cache example dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.bun/install/cache | |
| examples/react/node_modules | |
| key: ${{ runner.os }}-bun-examples-${{ hashFiles('examples/react/bun.lockb') }} | |
| restore-keys: | | |
| ${{ runner.os }}-bun-examples- | |
| ${{ runner.os }}-bun- | |
| - name: Install example dependencies | |
| run: bun install --frozen-lockfile | |
| working-directory: examples/react | |
| - name: Build example app | |
| run: bun run build | |
| working-directory: examples/react | |
| env: | |
| NODE_ENV: production | |
| VITE_PUBLIC_POSTHOG_KEY: ${{ secrets.VITE_PUBLIC_POSTHOG_KEY }} | |
| VITE_PUBLIC_POSTHOG_HOST: ${{ secrets.VITE_PUBLIC_POSTHOG_HOST }} | |
| - name: Prepare deployment directory | |
| run: | | |
| mkdir -p _site | |
| cp -r examples/react/build/client/* _site/ | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./_site | |
| deploy: | |
| name: Deploy to GitHub Pages | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |