-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (34 loc) · 1.01 KB
/
new-post.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
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 }}