Skip to content

fix deploy script

fix deploy script #2

Workflow file for this run

name: Deploy
on:
push:
branches:
- main
jobs:
deploy-commands:
name: Deploy Commands
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Install pnpm
uses: pnpm/action-setup@v3
- name: Install Node 20
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Create empty .env file
run: touch .env
- name: Deploy commands to Discord
run: pnpm run deploy-commands
env:
APPLICATION_ID: ${{ secrets.APPLICATION_ID }}
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
deploy-worker:
name: Deploy Worker
runs-on: ubuntu-latest
timeout-minutes: 60
needs: [deploy-commands]
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Install pnpm
uses: pnpm/action-setup@v3
- name: Build & Deploy Worker
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
secrets: |
PUBLIC_KEY
env:
PUBLIC_KEY: ${{ secrets.PUBLIC_KEY }}