Merge pull request #320 from honzajavorek/dependabot/pip/pillow-heif-… #1928
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: build | |
on: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: "0 4 * * *" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.GH_PAT }} | |
- name: Install Poetry | |
run: pipx install poetry | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
cache: "poetry" | |
- name: Install Python dependencies | |
run: poetry install | |
- name: Test | |
run: poetry run blog test | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "latest" | |
cache: "npm" | |
cache-dependency-path: "./theme/package-lock.json" | |
- name: Install JS dependencies for the theme | |
run: npm install --prefix=./theme | |
- name: Synchronize toots | |
env: | |
MASTODON_CLIENT_ID: ${{ secrets.MASTODON_CLIENT_ID }} | |
MASTODON_CLIENT_SECRET: ${{ secrets.MASTODON_CLIENT_SECRET }} | |
MASTODON_ACCESS_TOKEN: ${{ secrets.MASTODON_ACCESS_TOKEN }} | |
run: poetry run blog toots | |
- name: Pelican Build | |
run: poetry run blog build | |
- name: "Extra: Kočárkino" | |
run: poetry run blog kocarkino > ./public/kocarkino.ics | |
- name: "Extra: Reading" | |
env: | |
NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }} | |
run: poetry run blog reading > ./public/reading.xml | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./public | |
cname: honzajavorek.cz | |
- name: Wait for deployment | |
run: poetry run blog wait | |
- name: Send to Telegram | |
env: | |
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} | |
run: poetry run blog telegram | |
- name: Send to Mastodon | |
env: | |
MASTODON_CLIENT_ID: ${{ secrets.MASTODON_CLIENT_ID }} | |
MASTODON_CLIENT_SECRET: ${{ secrets.MASTODON_CLIENT_SECRET }} | |
MASTODON_ACCESS_TOKEN: ${{ secrets.MASTODON_ACCESS_TOKEN }} | |
run: poetry run blog mastodon | |
- name: Save to Git | |
uses: EndBug/add-and-commit@v9 | |
with: | |
pull: --rebase --autostash | |
add: ./content | |
message: "sync ⚙️" |