mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
35 lines
897 B
YAML
35 lines
897 B
YAML
name: CD Host
|
|
|
|
on:
|
|
push:
|
|
branches: main
|
|
schedule:
|
|
- cron: '0 */5 * * *'
|
|
workflow_dispatch:
|
|
|
|
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/blitzkrieg/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 }} DISCORD_BLITZ_DB=${{ secrets.DISCORD_BLITZ_DB }} node --enable-source-maps index.cjs
|