fix: surface macos_prefs as top-level field in config API response #61
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: CI / Deploy | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install dependencies | |
| run: npm install --legacy-peer-deps | |
| - name: Type check | |
| run: npm run check | |
| - name: Run tests with coverage | |
| run: npm run test:coverage | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| use_oidc: true | |
| files: ./coverage/coverage-final.json | |
| flags: unittests | |
| name: openboot-web-coverage | |
| fail_ci_if_error: false | |
| - name: Build | |
| run: npm run build | |
| deploy: | |
| needs: check | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install dependencies | |
| run: npm install --legacy-peer-deps | |
| - name: Build | |
| run: npm run build | |
| - name: Run D1 Migrations | |
| env: | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| run: npx wrangler d1 migrations apply openboot --remote | |
| - name: Deploy | |
| uses: cloudflare/wrangler-action@v3 | |
| with: | |
| apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| - name: Health Check | |
| run: | | |
| echo "Waiting 10 seconds for deployment to propagate..." | |
| sleep 10 | |
| echo "Running health check..." | |
| HEALTH_RESPONSE=$(curl -s https://openboot.dev/api/health) | |
| echo "Health check response: $HEALTH_RESPONSE" | |
| STATUS=$(echo $HEALTH_RESPONSE | jq -r '.status') | |
| if [ "$STATUS" != "healthy" ]; then | |
| echo "Health check failed! Status: $STATUS" | |
| echo "Full response: $HEALTH_RESPONSE" | |
| exit 1 | |
| fi | |
| echo "Health check passed!" | |
| echo "API: $(echo $HEALTH_RESPONSE | jq -r '.checks.api')" | |
| echo "Database: $(echo $HEALTH_RESPONSE | jq -r '.checks.database')" | |
| echo "Version: $(echo $HEALTH_RESPONSE | jq -r '.version')" |