Skip to content

blog_posted

blog_posted #57

Workflow file for this run

# /.github/workflows/deploy.yml
name: Deploy
on:
repository_dispatch:
types: [blog_posted]
jobs:
tweet_PR:
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: pip
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r .github/requirements.txt
- name: Tweet to promote our new blog post
env:
MICROCMS_URL: ${{ secrets.MICROCMS_URL }}
X_MICROCMS_API_KEY: ${{ secrets.X_MICROCMS_API_KEY }}
TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }}
TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }}
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
BLOG_BASE_URL: ${{ secrets.BLOG_BASE_URL }}
BEARER_TOKEN: ${{ secrets.BEARER_TOKEN }}
run: |
python .github/scripts/tweet_promotion.py '${{ toJSON(github.event.client_payload) }}'