-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
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
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 |