Skip to content

Post

Post #1503

Workflow file for this run

name: Post
on:
workflow_dispatch:
schedule:
- cron: "24 4,8,13 * * *"
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: docker compose up -d
- run: pnpm wait-on http-get://localhost:20279
- 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 --prepare-image; else echo Nothing to do; fi
- run: if test -f .data/next.id.txt; then pnpm cli --post; else echo Nothing to do; fi
env:
FACEBOOK_PAGE_ACCESS_TOKEN: ${{ secrets.FACEBOOK_PAGE_ACCESS_TOKEN }}
- run: if test -f .data/next.id.txt; then pnpm cli --comment; else echo Nothing to do; fi
env:
FACEBOOK_PAGE_ACCESS_TOKEN: ${{ secrets.FACEBOOK_PAGE_ACCESS_TOKEN }}
- run: git add state && git diff --cached
if: always()
- uses: stefanzweifel/git-auto-commit-action@v4
if: always()
with:
commit_message: Update state file
commit_user_name: "dtinth-bot"
commit_user_email: "[email protected]"
permissions:
contents: write