chore(web): remove archived routes and nested Cursor config #1
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 Web to Cloudflare Workers | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| env: | |
| NODE_VERSION: "24" | |
| PNPM_VERSION: "10.28.2" | |
| jobs: | |
| changes: | |
| name: File Detection | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| permissions: | |
| contents: read | |
| outputs: | |
| deploy: ${{ steps.deploy_changes.outputs.any_changed }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Check Deploy Files | |
| uses: tj-actions/changed-files@24d32ffd492484c1d75e0c0b894501ddb9d30d62 # v47 | |
| id: deploy_changes | |
| with: | |
| files: | | |
| apps/web/app/** | |
| apps/web/components/** | |
| apps/web/lib/** | |
| apps/web/content/** | |
| apps/web/public/** | |
| apps/web/data/** | |
| apps/web/types/** | |
| apps/web/middleware.ts | |
| apps/web/next.config.ts | |
| apps/web/next-env.d.ts | |
| apps/web/open-next.config.ts | |
| apps/web/tailwind.config.* | |
| apps/web/postcss.config.* | |
| apps/web/tsconfig.json | |
| apps/web/tsconfig.tsbuildinfo | |
| apps/web/eslint.config.mjs | |
| apps/web/prettier.config.mjs | |
| apps/web/components.json | |
| apps/web/env.ts | |
| apps/web/cloudflare-env.d.ts | |
| apps/web/worker-configuration.d.ts | |
| apps/web/wrangler.jsonc | |
| apps/web/trigger.config.ts | |
| apps/web/trigger/** | |
| apps/web/scripts/** | |
| .github/scripts/web/** | |
| apps/web/docs/** | |
| files_ignore: | | |
| apps/web/**/*.test.* | |
| apps/web/**/*.spec.* | |
| apps/web/__tests__/** | |
| apps/web/**/test/** | |
| apps/web/**/tests/** | |
| apps/web/*.md | |
| apps/web/docs/**/*.md | |
| apps/web/package.json | |
| pnpm-lock.yaml | |
| .github/renovate.json5 | |
| deploy: | |
| name: Deploy | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| needs: [changes] | |
| if: ${{ (github.event_name != 'pull_request' || github.event.pull_request.user.login != 'renovate[bot]') && (needs.changes.outputs.deploy == 'true' || github.event_name == 'workflow_dispatch') }} | |
| environment: | |
| name: ${{ contains(github.ref, 'main') && 'prod' || 'dev' }} | |
| url: ${{ contains(github.ref, 'main') && 'https://allthingslinux.org' || 'https://allthingslinux.dev' }} | |
| permissions: | |
| contents: read | |
| deployments: write | |
| pull-requests: write | |
| defaults: | |
| run: | |
| working-directory: apps/web | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - name: Setup Node and pnpm | |
| uses: ./.github/actions/setup-node-pnpm | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| pnpm-version: ${{ env.PNPM_VERSION }} | |
| - name: Setup Cloudflare Bindings (R2, KV) | |
| run: | | |
| echo "🔧 Setting up Cloudflare bindings (R2, KV) if they don't exist..." | |
| chmod +x scripts/setup-bindings.sh | |
| scripts/setup-bindings.sh || true | |
| env: | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| - name: Build application | |
| run: pnpm run build:all | |
| - name: Set secrets in Cloudflare Worker | |
| run: | | |
| ENV_NAME="${{ contains(github.ref, 'main') && 'prod' || 'dev' }}" | |
| echo "🔐 Setting secrets for ${ENV_NAME} environment..." | |
| chmod +x "${{ github.workspace }}/.github/scripts/web/secrets.sh" | |
| bash "${{ github.workspace }}/.github/scripts/web/secrets.sh" "$ENV_NAME" | |
| env: | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| QUICKBOOKS_CLIENT_ID: ${{ secrets.QUICKBOOKS_CLIENT_ID }} | |
| QUICKBOOKS_CLIENT_SECRET: ${{ secrets.QUICKBOOKS_CLIENT_SECRET }} | |
| QUICKBOOKS_REFRESH_TOKEN: ${{ secrets.QUICKBOOKS_REFRESH_TOKEN }} | |
| QUICKBOOKS_REALM_ID: ${{ secrets.QUICKBOOKS_REALM_ID }} | |
| QUICKBOOKS_ADMIN_KEY: ${{ secrets.QUICKBOOKS_ADMIN_KEY }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| MONDAY_API_KEY: ${{ secrets.MONDAY_API_KEY }} | |
| TRIGGER_SECRET_KEY: ${{ secrets.TRIGGER_SECRET_KEY }} | |
| MONDAY_BOARD_ID: ${{ vars.MONDAY_BOARD_ID }} | |
| DISCORD_WEBHOOK_URL: ${{ vars.DISCORD_WEBHOOK_URL }} | |
| QUICKBOOKS_ENVIRONMENT: ${{ vars.QUICKBOOKS_ENVIRONMENT }} | |
| - name: Deploy to Cloudflare Workers | |
| run: | | |
| ENV_NAME="${{ contains(github.ref, 'main') && 'prod' || 'dev' }}" | |
| echo "🚀 Deploying to ${{ contains(github.ref, 'main') && 'PRODUCTION' || 'DEVELOPMENT' }} environment (worker: allthingslinux-${ENV_NAME})..." | |
| pnpm exec opennextjs-cloudflare deploy --env $ENV_NAME | |
| env: | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| - name: Create deployment comment | |
| if: github.event_name == 'pull_request' | |
| uses: peter-evans/create-or-update-comment@v5 | |
| continue-on-error: true | |
| with: | |
| issue-number: ${{ github.event.pull_request.number }} | |
| body: | | |
| ## 🚀 Deployment Status | |
| **Environment:** ${{ contains(github.ref, 'main') && 'Production' || 'Development' }} | |
| **Branch:** `${{ github.event_name == 'pull_request' && 'PR #' || '' }}${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.ref_name }} ${{ github.event_name == 'pull_request' && '(' || '' }}${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || '' }} ${{ github.event_name == 'pull_request' && ')' || '' }}` | |
| **Commit:** `${{ github.sha }}` | |
| **URLs:** | |
| - **Production:** [https://allthingslinux.org](https://allthingslinux.org) | |
| - **Development:** [https://allthingslinux.dev](https://allthingslinux.dev) | |
| Deployment completed successfully! ✨ |