Skip to content

Update tauri deps (#214) #23

Update tauri deps (#214)

Update tauri deps (#214) #23

name: Deploy Discord App
on:
workflow_dispatch:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
name: Deploy
steps:
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
- uses: pnpm/action-setup@v3
with:
version: 9
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install
run: pnpm install --filter=bot
- name: Deploy commands
run: pnpm register
working-directory: apps/bot
env:
DISCORD_APPLICATION_ID: ${{ secrets.DISCORD_APPLICATION_ID }}
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
- name: Remove types package
run: pnpm uninstall @types/github-script
- name: Deploy worker
if: steps.changes.outputs.api == 'true' && ${{ github.event_name }}" != "workflow_dispatch"
uses: cloudflare/wrangler-action@v3
with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
workingDirectory: apps/bot
packageManager: pnpm