Update products votes #24
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: Update products votes | |
on: | |
schedule: | |
- cron: "30 1 * * *" | |
workflow_dispatch: | |
jobs: | |
update-products-votes: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Python environment | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: pip install requests | |
- name: Update products votes | |
run: python3 scripts/update-products-votes.py | |
- name: Git commit & push | |
run: | | |
git config user.name github-actions | |
git config user.email [email protected] | |
git add . | |
git diff --quiet && git diff --staged --quiet || git commit -m "[auto] Updated products votes on documentation" | |
git push |