Deploy #7410
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 | |
| on: | |
| workflow_run: | |
| workflows: | |
| - CI | |
| types: | |
| - completed | |
| env: | |
| CI: true | |
| TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
| TURBO_TEAM: ${{ vars.TURBO_TEAM }} | |
| TURBO_REMOTE_CACHE_TIMEOUT: 120 | |
| VERCEL_ORG_ID: ${{ vars.VERCEL_ORG_ID }} | |
| VERCEL_PROJECT_ID: ${{ vars.VERCEL_PROJECT_ID }} | |
| VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} | |
| SHOPIFY_API_KEY: ${{ secrets.SHOPIFY_API_KEY }} | |
| SHOPIFY_API_SECRET_KEY: ${{ secrets.SHOPIFY_API_SECRET_KEY }} | |
| AUTH_SECRET: "development-secret" | |
| jobs: | |
| vercel: | |
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
| name: 🚚 Deploy to Vercel | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: 🕶️ Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ github.event.workflow_run.head_branch }} | |
| fetch-depth: 0 | |
| - name: 🚀 Bootstrap | |
| uses: ./.github/common/bootstrap | |
| with: | |
| turbo-cache: "false" | |
| - name: 📦 Pull Vercel project config | |
| run: pnpm dlx vercel pull --yes --token=${{ secrets.VERCEL_TOKEN }} | |
| #- name: 🚚 Push to Vercel | |
| # run: pnpm dlx vercel deploy --prod --archive=tgz --token=${{ secrets.VERCEL_TOKEN }} | |
| cloudflare: | |
| needs: [vercel] | |
| if: false | |
| name: 🚚 Notify CloudFlare | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - name: 🔥 Purge CloudFlare cache | |
| run: | | |
| curl -X POST \ | |
| -H "Content-Type: application/json" \ | |
| -H "Accept: application/json, application/vnd.github.v3+json" \ | |
| -H "Authorization: Bearer ${{ secrets.CLOUDFLARE_TOKEN }}" \ | |
| --data "{\"purge_everything\":true}" \ | |
| https://api.cloudflare.com/client/v4/zones/${{ secrets.CLOUDFLARE_ID }}/purge_cache |