Mastodon Autoposter #696
This file contains hidden or 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: Mastodon Autoposter | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "59 2,14 * * *" | |
| jobs: | |
| mastoposter: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout the Code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| cache: 'pip' | |
| - name: Install Dependencies | |
| run: pip install Mastodon.py titlecase pyyaml python-frontmatter tweepy atproto pypdf tqdm yaspin bs4 google google-api-python-client google_auth_oauthlib joblib youtube-transcript-api | |
| - name: Run Mastoposter | |
| shell: bash | |
| run: | | |
| printf '${{ secrets.GTOKEN }}' > ~/gtoken.json | |
| printf '${{ secrets.LIBRARY_UTILS_CLIENT_SECRET }}' > ~/library-utils-client-secret.json | |
| printf "${{ secrets.ARCHIVE_ORG_AUTH }}" > ~/archive.org.auth | |
| cd scripts | |
| BLUESKY_PASSWORD="${{ secrets.BLUESKY_PASSWORD }}" MASTODON_TOKEN="${{ secrets.MASTODON_TOKEN }}" X_CONSUMER_KEY="${{ secrets.X_CONSUMER_KEY }}" X_CONSUMER_SECRET="${{ secrets.X_CONSUMER_SECRET }}" X_ACCESS_TOKEN="${{ secrets.X_ACCESS_TOKEN }}" X_ACCESS_TOKEN_SECRET="${{ secrets.X_ACCESS_TOKEN_SECRET }}" python mastoposter.py |