mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
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: Install Yarn
|
|
run: npm install --location=global yarn
|
|
|
|
- name: Add fixed sharp
|
|
run: yarn add [email protected] --ignore-engines
|
|
|
|
- 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
|