Update CV from CV-repo #2
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 CV on Hugo Site | |
on: | |
schedule: | |
- cron: '0 0 * * 1' # Runs every Monday at midnight | |
workflow_dispatch: | |
jobs: | |
update-cv: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Hugo Site Repository | |
uses: actions/checkout@v3 | |
- name: Download Latest CV Release Asset | |
uses: houqp/[email protected] | |
with: | |
repo: 'roumail/cv-data' | |
token: ${{ secrets.GH_PAT }} | |
match: 'resume-general-v.*\\.zip' | |
rename: resume.zip | |
- name: Place Latest Resume in Static Folder | |
run: | | |
unzip resume.zip -d resume | |
RESUME_NAME=$(ls resume/*.pdf) | |
RESUME_NAME=${RESUME_NAME##*/} | |
cp -f "resume/$RESUME_NAME" static/upload/resume.pdf | |
- name: Commit and Push CV Update | |
run: | | |
git config --global user.name 'GitHub Actions' | |
git config --global user.email '[email protected]' | |
git add static/upload/resume.pdf | |
git commit -m 'Update CV to latest version' | |
git push |