Skip to content

Update CV from CV-repo #11

Update CV from CV-repo

Update CV from CV-repo #11

Workflow file for this run

name: Update CV from CV-repo
on:
schedule:
- cron: '0 0 * * 1' # Runs every Monday at midnight
workflow_dispatch:
jobs:
update-cv:
runs-on: ubuntu-latest
permissions:
contents: write
# env:
# GH_TOKEN: ${{ secrets.GH_PAT }}
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/uploads/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/uploads/resume.pdf
# Check if there are changes
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m 'Update CV to latest version'
git push
fi