Sync CV PDF from LennonLab/cv #56
This file contains hidden or 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: Sync CV PDF from LennonLab/cv | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 6 * * *' | |
| permissions: | |
| contents: write # allow pushing to repo | |
| jobs: | |
| sync-cv: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout website repo | |
| uses: actions/checkout@v3 | |
| - name: Checkout CV repo | |
| uses: actions/checkout@v3 | |
| with: | |
| repository: LennonLab/cv | |
| path: cv-source | |
| token: ${{ secrets.PERSONAL_TOKEN }} | |
| - name: Copy latest CV PDF | |
| run: | | |
| cp cv-source/Lennon_CV.pdf assets/docs/Lennon_CV.pdf | |
| - name: Touch file to trigger site rebuild | |
| run: | | |
| date > .trigger-rebuild.txt | |
| - name: Commit and push CV update + rebuild trigger | |
| run: | | |
| git config user.name "GitHub Actions" | |
| git config user.email "actions@github.com" | |
| git add assets/docs/Lennon_CV.pdf .trigger-rebuild.txt | |
| git commit -m "Auto-sync latest CV.pdf and trigger rebuild" || echo "No changes to commit" | |
| git push |