Post to BotBlock #1879
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Post to BotBlock | |
on: | |
schedule: | |
- cron: "0 6,18 * * *" | |
workflow_dispatch: | |
jobs: | |
run: | |
name: Run | |
runs-on: self-hosted | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Set up pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
run_install: false | |
- name: Set up node | |
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4 | |
with: | |
node-version-file: ".nvmrc" | |
cache: "pnpm" | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Set up build cache | |
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4 | |
id: cache-build | |
with: | |
path: build | |
key: build-${{ github.sha }} | |
- name: Build project | |
run: pnpm build | |
if: steps.cache-build.outputs.cache-hit != 'true' | |
- name: Post to Botblock | |
run: npm run start | |
env: | |
DISCORD_BOT_ID: "467377486141980682" | |
COUNTR_API_ENDPOINT: ${{ secrets.COUNTR_API_ENDPOINT }} | |
BOTBLOCK_KEYS: ${{ secrets.BOTBLOCK_KEYS }} |