Skip to content

Deploy

Deploy #5760

Workflow file for this run

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 }}
MONGODB_DATA_API_TOKEN: ${{ secrets.MONGODB_DATA_API_TOKEN }}
MONGODB_DATA_API_URI: ${{ secrets.MONGODB_DATA_API_URI }}
jobs:
vercel:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
name: 🚚 Deploy to Vercel
runs-on: ubuntu-latest
steps:
- name: πŸ•ΆοΈ Checkout repository
uses: actions/checkout@v4
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@v4
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