Switch feed to phareim-api — unified endpoint with server-side cursor #106
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 Cloudflare Pages | |
| on: | |
| push: | |
| branches: [master] | |
| workflow_dispatch: | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - run: npm install | |
| - run: npx nuxt build | |
| env: | |
| NITRO_PRESET: cloudflare-pages | |
| FIREBASE_API_KEY: ${{ secrets.FIREBASE_API_KEY }} | |
| FIREBASE_AUTH_DOMAIN: ${{ secrets.FIREBASE_AUTH_DOMAIN }} | |
| FIREBASE_PROJECT_ID: ${{ secrets.FIREBASE_PROJECT_ID }} | |
| FIREBASE_STORAGE_BUCKET: ${{ secrets.FIREBASE_STORAGE_BUCKET }} | |
| FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.FIREBASE_MESSAGING_SENDER_ID }} | |
| FIREBASE_APP_ID: ${{ secrets.FIREBASE_APP_ID }} | |
| FIREBASE_MEASUREMENT_ID: ${{ secrets.FIREBASE_MEASUREMENT_ID }} | |
| - name: Initialize D1 Schema | |
| run: npx wrangler d1 execute phareim-rpg --file=database/schema.sql --remote | |
| env: | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| - uses: cloudflare/wrangler-action@v3 | |
| with: | |
| apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| command: pages deploy dist --project-name=phareim-no | |
| - name: Notify Sleeper | |
| if: success() | |
| run: | | |
| curl -s -X POST https://sleeper.phareim.no/tasks/notify \ | |
| -H "Authorization: Bearer ${{ secrets.SLEEPER_API_KEY }}" \ | |
| -H "Content-Type: application/json" \ | |
| -d '{"title":"phareim.no deployed","body":"${{ github.event.head_commit.message }}"}' |