Skip to content

Weekly Update

Weekly Update #7

Workflow file for this run

name: Weekly Update
on:
schedule:
- cron: "0 0 * * 0"
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Set up Emacs
uses: purcell/setup-emacs@master
with:
version: 29.4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install requests module
run: pip3 install requests
- uses: actions/checkout@v4
- name: Find new posts
run: python3 bin/run.py --output-ungrouped --output-grouped-by-year
env:
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
- name: Export org to markdown
run: |
emacs --batch -l bin/convert-to-md.el out.org
emacs --batch -l bin/convert-to-md.el create-toc out_by_year.org
- name: Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "emacs-reddit-tips-n-tricks-bot"
git add *.org *.md comments.json
git commit -m "Weekly update from $(date +%Y-%m-%d)"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: master