Deploy #5760
This file contains 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 }} | |
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 |