Skip to content

chore(deps): update all non-major dependencies (#93) #39

chore(deps): update all non-major dependencies (#93)

chore(deps): update all non-major dependencies (#93) #39

Workflow file for this run

name: Deploy
on:
push:
branches:
- main
paths:
- 'scripts/**'
- 'src/**'
- 'package.json'
- 'pnpm-lock.yaml'
- 'wrangler.toml'
jobs:
deploy:
name: Deploy Commands & Worker
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install pnpm
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- name: Install Node 22
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 22
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Create empty .dev.vars file
run: touch .dev.vars
- name: Deploy commands to Discord
run: node --run deploy-commands
env:
APPLICATION_ID: ${{ secrets.APPLICATION_ID }}
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
# The wrangler action normally installs a hardcoded version of wrangler.
# This step gets the version we use from package.json.
# See https://github.com/cloudflare/wrangler-action/issues/231#issuecomment-1976018383.
- name: Set wrangler version
id: wrangler
run: echo "version=$(jq -r .devDependencies.wrangler package.json | cut -c2-)" >> "$GITHUB_OUTPUT"
- name: Build & Deploy Worker
uses: cloudflare/wrangler-action@05f17c4a695b4d94b57b59997562c6a4624c64e4 # v3.12.1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
wranglerVersion: ${{ steps.wrangler.outputs.version }}
secrets: |
DISCORD_WEBHOOK
PUBLIC_KEY
WEBHOOK_SECRET
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
PUBLIC_KEY: ${{ secrets.PUBLIC_KEY }}
WEBHOOK_SECRET: ${{ secrets.WEBHOOK_SECRET }}