Skip to content

Feat/transfer tickets (#305) #1184

Feat/transfer tickets (#305)

Feat/transfer tickets (#305) #1184

Workflow file for this run

name: Deploy to DEV
on:
push:
branches:
- main
pull_request:
jobs:
deploy:
name: Deploy to Cloudflare Workers — DEV
runs-on: ubuntu-latest
steps:
- name: ⏳ Cloning repo
uses: actions/checkout@v4
with:
show-progress: false
- name: ⬢ Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
- name: 📦 Download Cached Package Dependencies
uses: actions/cache@v3
env:
cache-name: NPM
with:
path: ~/.npm
key: CACHE-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }}
- name: 📥 Install dependencies
run: npm ci --prefer-offline --no-audit --legacy-peer-deps --cache ~/.npm
# Deploy the email RPC Service
- name: 🛳️ DEPLOY EMAIL-RPC SERVICE WORKER
run: CLOUDFLARE_API_TOKEN=${{ secrets.CLOUDFLARE_WORKERS_JSCONF_DEV_DEPLOY }} npx wrangler deploy --minify --config ./workers/transactional_email_service/wrangler.toml
# Deploy the svg-renderer
- name: 🛳️ DEPLOY SVG-RENDERER WORKER
run: CLOUDFLARE_API_TOKEN=${{ secrets.CLOUDFLARE_WORKERS_JSCONF_DEV_DEPLOY }} npx wrangler deploy --minify --config ./workers/svg_renderer/wrangler.toml
# Deploy the auth tokens worker
- name: 🛳️ DEPLOY AUTH-TOKEN WORKER
run: CLOUDFLARE_API_TOKEN=${{ secrets.CLOUDFLARE_WORKERS_JSCONF_DEV_DEPLOY }} npx wrangler deploy --minify --config ./workers/auth_tokens/wrangler.toml
# Deploy the wall of fame worker
- name: 🛳️ DEPLOY WALL-OF-FAME WORKER
run: CLOUDFLARE_API_TOKEN=${{ secrets.CLOUDFLARE_WORKERS_JSCONF_DEV_DEPLOY }} npx wrangler deploy --minify --config ./workers/wall_of_fame_cron/wrangler.toml
# Deploy the purchase order sync cron worker
- name: 🛳️ DEPLOY WALL-OF-FAME WORKER
run: CLOUDFLARE_API_TOKEN=${{ secrets.CLOUDFLARE_WORKERS_JSCONF_DEV_DEPLOY }} npx wrangler deploy --minify --config ./workers/purchase_order_payment_sync_cron/wrangler.toml
# Deploy the email webhook worker
- name: 🛳️ DEPLOY EMAIL_WEBHOOK WORKER
run: CLOUDFLARE_API_TOKEN=${{ secrets.CLOUDFLARE_WORKERS_JSCONF_DEV_DEPLOY }} npx wrangler deploy --minify --config ./workers/email_webhook/wrangler.toml
# Deploy the sanity asset importer worker
- name: 🛳️ DEPLOY SANITY-ASSET-IMPORTER WORKER
run: CLOUDFLARE_API_TOKEN=${{ secrets.CLOUDFLARE_WORKERS_JSCONF_DEV_DEPLOY }} npx wrangler deploy --minify --config ./workers/sanity_asset_importer/wrangler.toml
# Deploy the API
- name: 🛳️ DEPLOY Cloudflare Workers
run: CLOUDFLARE_API_TOKEN=${{ secrets.CLOUDFLARE_WORKERS_JSCONF_DEV_DEPLOY }} npx wrangler deploy --minify
# Redeploy the EMAIL queue consumer
- name: 💀/🛳️ RE-DEPLOY MAIL queue consumer
run: |
CLOUDFLARE_API_TOKEN=${{ secrets.CLOUDFLARE_WORKERS_JSCONF_DEV_DEPLOY }} npx wrangler queues consumer remove mail-queue-dev mail-queue-consumer && \
CLOUDFLARE_API_TOKEN=${{ secrets.CLOUDFLARE_WORKERS_JSCONF_DEV_DEPLOY }} npx wrangler deploy --minify --config ./workers/email_queue/wrangler.toml
# Redeploy the Google Import consumer
- name: 💀/🛳️ RE-DEPLOY GOOGLE-IMPORT queue consumer
run: |
CLOUDFLARE_API_TOKEN=${{ secrets.CLOUDFLARE_WORKERS_JSCONF_DEV_DEPLOY }} npx wrangler queues consumer remove google-photos-import-queue-dev google-import-queue-consumer && \
CLOUDFLARE_API_TOKEN=${{ secrets.CLOUDFLARE_WORKERS_JSCONF_DEV_DEPLOY }} npx wrangler deploy --minify --config ./workers/google_import_queue_consumer/wrangler.toml