name: CD Host on: push: branches: main schedule: - cron: '0 */5 * * *' workflow_dispatch: release: types: [created, published, released, edited] concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: host: runs-on: ubuntu-latest steps: - uses: oven-sh/setup-bun@v1 with: bun-version: 1.1.33 - name: Download release assets run: | DOWNLOAD_URL=$(curl -s https://api.github.com/repos/tresabhi/blitzkit/releases/latest \ | grep "browser_download_url.*bot.zip" \ | cut -d : -f 2,3 \ | tr -d \") curl -L -o bot.zip $DOWNLOAD_URL mkdir -p dist/bot unzip bot.zip -d dist/bot - name: Run bot env: GH_TOKEN: ${{ secrets.GH_TOKEN }} DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }} DATABASE_URL: ${{ secrets.DATABASE_URL }} DISCORD_CLIENT_ID: ${{ secrets.DISCORD_CLIENT_ID }} run: | mv dist/bot/prisma . mv dist/bot/node_modules . mv dist/bot/package.json . bun dist/bot/index.js --production