New post #532
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: New post | |
on: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
post: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install apt packages | |
uses: awalsh128/cache-apt-pkgs-action@v1.4.2 | |
with: | |
packages: libssl-dev libasound2 ffmpeg | |
- name: Install poetry | |
run: pip install poetry | |
- name: Debug | |
run: pwd && ls -la | |
- name: Setup | |
run: poetry config virtualenvs.create false && poetry install --no-root | |
- name: new post | |
run: poetry run python3 -m author --no-interactive --dest ./output/ | |
env: | |
OPENAI_TOKEN: ${{ secrets.OPENAI_TOKEN}} | |
AZ_SUBSCRIPTION_KEY: ${{ secrets.AZ_SUBSCRIPTION_KEY }} | |
BLOG_GITHUB_TOKEN: ${{ secrets.BLOG_GITHUB_TOKEN }} | |
S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }} | |
S3_SECRET_KEY: ${{ secrets.S3_SECRET_KEY }} |