Deploy #6804
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 }} | |
| 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' | |
| SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
| SENTRY_ORG: ${{ vars.SENTRY_ORG }} | |
| SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }} | |
| jobs: | |
| vercel: | |
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
| name: 🚚 Deploy to Vercel | |
| runs-on: ubuntu-latest | |
| 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 | |
| - name: 📦 Install Vercel CLI | |
| run: | | |
| npx vercel pull --yes --token=${{ secrets.VERCEL_TOKEN }} | |
| #- name: 🚚 Push to Vercel | |
| # run: npx vercel deploy --prod --archive=tgz --token=${{ secrets.VERCEL_TOKEN }} | |
| cloudflare: | |
| needs: [vercel] | |
| name: 🚚 Notify CloudFlare | |
| runs-on: ubuntu-latest | |
| 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 | |
| - name: 🔥 Purge CloudFlare cache | |
| if: false | |
| 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 |