Update Gaia Citations Plot #259
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 Gaia Citations Plot | |
on: | |
schedule: | |
- cron: '0 9 * * *' | |
workflow_dispatch: | |
jobs: | |
update_plot: | |
name: Update plot with new citations | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.7' | |
cache: 'pip' | |
- name: Install Dependencies | |
run: pip install -r requirements.txt | |
- name: Run Script and Update Plot | |
run: | | |
python query_and_plot.py | |
env: | |
ADS_API_TOKEN: ${{ secrets.ADS_API_TOKEN }} | |
- name: Commit and Push Changes | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Actions" | |
git add citations_per_month.png | |
git commit -m "Updated plot on `date` with GitHub Actions" | |
git push origin main --force |