collect-posts #533
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: collect-posts | |
on: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: "1 00 * * *" | |
jobs: | |
download-posts: | |
name: "Check for new posts, download them and re-publish" | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: 'run' | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
cache: pip | |
- run: pip install -r requirements.txt | |
- name: grab posts | |
run: python grab.py | |
- name: Build and Deploy Nikola | |
uses: getnikola/nikola-action@v8 | |
with: | |
dry_run: false | |
- name: check branch | |
run: | | |
sudo chmod -R ugo+rwX . | |
git config --global user.name 'GHABot' | |
git config --global user.email 'GHABot@nomail' | |
git add gsoc* output/* posts/* | |
git commit -m "update from $(date)" | |
git push origin run:run |