Skip to content

Merge pull request #17 from CojourneyAI/moon/typed #44

Merge pull request #17 from CojourneyAI/moon/typed

Merge pull request #17 from CojourneyAI/moon/typed #44

name: Deploy Cloudflare Worker
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
name: Deploy
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm' # This tells the setup-node action to cache npm dependencies
- name: Install dependencies
run: npm install @nx/nx-linux-x64-gnu && npm ci --include=optional && npm run build:worker
- uses: actions/checkout@v3
- name: Deploy
working-directory: packages/worker # Specifies the directory where the npm command should be run
# run npx wrangler publish
run: npm install && CLOUDFLARE_ACCOUNT_ID=${{ secrets.CLOUDFLARE_ACCOUNT_ID }} CLOUDFLARE_API_TOKEN=${{ secrets.CLOUDFLARE_API_TOKEN }} npx wrangler deploy