Preview on Discord #22765
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: Preview on Discord | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "*/30 * * * *" | |
jobs: | |
sync: | |
name: Synchronize | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: pnpm | |
uses: pnpm/action-setup@v2 | |
- name: node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: pnpm | |
- run: pnpm install | |
- run: pnpm cli --list-events | |
- run: if test -f .data/next.id.txt; then pnpm cli --prepare-post; else echo Nothing to do; fi | |
- run: if test -f .data/next.id.txt; then pnpm cli --preview-on-discord; else echo Nothing to do; fi | |
env: | |
DISCORD_STATE_URL: ${{ secrets.DISCORD_STATE_URL }} | |
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} |