name: Post FCBHandbol Twitter user feed to BSKY
description: "A GitHub Action to post from Twitter to Bluesky (BSKY) using a Python script."

on:
  workflow_dispatch:
  schedule:
    - cron: '*/30 * * * *'  # every 30 minutes

jobs:
  post:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      
      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: '3.14'
          
      - name: Install dependencies
        run: |
          pip install -U atproto tweety-ns playwright httpx arrow python-dotenv -q
          playwright install chromium
          
      - name: Run script
        run: |
          python3 twitter2bsky_daemon.py \
            --twitter-username ${{ secrets.TWITTER_USERNAME }} \
            --twitter-password ${{ secrets.TWITTER_PASSWORD }} \
            --twitter-email ${{ secrets.TWITTER_FCB_EMAIL }} \
            --twitter-handle ${{ secrets.TWITTER_FCBHANDBOL_HANDLE }} \
            --bsky-handle ${{ secrets.BSKY_MQUB_HANDLE }} \
            --bsky-password ${{ secrets.BSKY_MQUB_PASSWORD }}