Repository navigation
Fix CI: use npm install so cross-platform native bindings resolve #2
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 to GitHub Pages | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| # Never let two deploys race; queue them and keep the newest. | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| # `npm install`, not `npm ci`. | |
| # | |
| # Vite 8 (rolldown) and Tailwind 4 (oxide) both ship optional native | |
| # bindings, and npm records only the variants it resolved on the machine | |
| # that generated the lockfile. A lockfile written on Windows therefore | |
| # can't satisfy `npm ci` on a Linux runner — it fails on missing | |
| # @emnapi/* packages that only the Linux tree needs. `npm install` still | |
| # honours the lockfile where it can and reconciles the platform-specific | |
| # bits instead of refusing outright. | |
| - run: npm install --no-audit --no-fund | |
| - run: npm run build | |
| env: | |
| # These are build-time substitutions, not secrets in the usual sense — | |
| # Vite inlines them into the bundle, where anyone can read them. They | |
| # live in GitHub Secrets to keep them out of the repo, but the real | |
| # protection is the Firestore rules plus the Maps key's HTTP referrer | |
| # restriction. See README. | |
| VITE_FIREBASE_API_KEY: ${{ secrets.VITE_FIREBASE_API_KEY }} | |
| VITE_FIREBASE_AUTH_DOMAIN: ${{ secrets.VITE_FIREBASE_AUTH_DOMAIN }} | |
| VITE_FIREBASE_PROJECT_ID: ${{ secrets.VITE_FIREBASE_PROJECT_ID }} | |
| VITE_FIREBASE_STORAGE_BUCKET: ${{ secrets.VITE_FIREBASE_STORAGE_BUCKET }} | |
| VITE_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.VITE_FIREBASE_MESSAGING_SENDER_ID }} | |
| VITE_FIREBASE_APP_ID: ${{ secrets.VITE_FIREBASE_APP_ID }} | |
| VITE_GOOGLE_MAPS_API_KEY: ${{ secrets.VITE_GOOGLE_MAPS_API_KEY }} | |
| VITE_GOOGLE_MAPS_MAP_ID: ${{ secrets.VITE_GOOGLE_MAPS_MAP_ID }} | |
| - uses: actions/configure-pages@v5 | |
| - uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: dist | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - id: deployment | |
| uses: actions/deploy-pages@v4 |