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: Push Resume to GitHub Page | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
python-version: ["3.10"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Push to Pages Repo | |
run: | | |
git config --global user.name "davidedigrande" | |
git config --global user.email "[email protected]" | |
cp resume*.yml resume.yml | |
git clone https://x-access-token:${GH_TOKEN}@github.com/davidedigrande/davidedigrande.github.io.git | |
pip install -r requirements.txt | |
python -m main | |
cp -R ./resume.html ./davidedigrande.github.io/index.html | |
cp -R ./resume.css ./davidedigrande.github.io/resume.css | |
cd davidedigrande.github.io | |
git add . | |
git commit -m "Update from Resume-Builder" | |
git push | |
cd .. | |
rm resume.yml | |
git rm --cached resume*.yml | |
git commit -m "Remove resume.yml" | |
mv resume*.yml resume$(md5sum resume*.yml | awk '{print $1}').yml | |
git add resume*.yml | |
git commit -m "Update resume.yml" | |
git push | |
env: | |
GH_TOKEN: ${{ secrets.RESUME_BUILDER_GITHUB_ACTION_TOKEN }} |