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: - name: Use node uses: actions/setup-node@v4 with: node-version: 18 - 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 unzip bot.zip - name: Run bot run: NODE_ENV=production GH_TOKEN=${{ secrets.GH_TOKEN }} DISCORD_TOKEN=${{ secrets.DISCORD_TOKEN }} DATABASE_URL=${{ secrets.DATABASE_URL }} node --enable-source-maps index.cjs