Skip to content

Commit

Permalink
add cron schedule to update the cv
Browse files Browse the repository at this point in the history
  • Loading branch information
roumail committed Nov 15, 2023
1 parent c312628 commit 3c94837
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/update-cv.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Update CV on Hugo Site

on:
schedule:
- cron: '0 0 * * *' # Runs every day at midnight

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:
repository: '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

0 comments on commit 3c94837

Please sign in to comment.