Skip to content

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

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

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

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@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Install pnpm
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- name: Install Node 22
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
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@f84a562284fc78278ff9052435d9526f9c718361 # v3.7.0
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 }}