update-publications #28
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-publications | |
on: | |
schedule: | |
- cron: "0 0 1 * *" | |
workflow_dispatch: | |
push: | |
paths: | |
- "env" | |
pull_request: | |
paths: | |
- "env" | |
jobs: | |
update-publications: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Run Docker image and update file | |
run: | | |
docker run --env-file env --rm dascalutudor/scholar-scraper:latest > updated-publications.yml | |
mv updated-publications.yml docs/_data/publications.yml && echo "mv command successful" || echo "mv command failed" | |
- name: Configure Git | |
run: | | |
git config --global user.name "GitHub Actions" | |
git config --global user.email "[email protected]" | |
- name: Commit changes | |
run: | | |
git add docs/_data/publications.yml | |
git commit -m "Update publications.yml" | |
- name: Push changes | |
uses: ad-m/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: "main" |