chore: tiny wording fix #61
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 all profiles on push | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout this repository | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token. | |
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. | |
- name: Python Setup | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
cache: 'pip' # caching pip dependencies | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
- name: Configure git | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "GitHub Action" | |
- name: Generate github profile Readme | |
run: | | |
python github-profile/generate_readme.py --data=user-data.yml --output=build/github-profile/README.md | |
- name: Update github bio using api | |
run: | | |
python github-profile/update_github_bio.py --data=user-data.yml --api-token=${{ secrets.PAT }} | |
- name: Download latex style files and Generate CV tex file | |
run: | | |
mkdir -p build/latex-cv | |
wget https://raw.githubusercontent.com/k4black/cv-template/main/altacv.cls -O build/latex-cv/altacv.cls | |
wget https://raw.githubusercontent.com/k4black/cv-template/main/pubs-authoryear.cfg -O build/latex-cv/pubs-authoryear.cfg | |
wget https://raw.githubusercontent.com/k4black/cv-template/main/pubs-num.cfg -O build/latex-cv/pubs-num.cfg | |
cp -r latex-cv/. build/latex-cv | |
python latex-cv/generate_tex.py --data=user-data.yml --output=build/latex-cv/cv.tex | |
ls -lah build/latex-cv | |
- name: Generate CV pdf file | |
uses: xu-cheng/latex-action@v3 | |
continue-on-error: true | |
with: | |
working_directory: build/latex-cv | |
root_file: cv.tex | |
continue_on_error: true | |
args: > | |
-shell-escape | |
-interaction=nonstopmode | |
-file-line-error | |
- name: Create CV artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: cv | |
path: build/latex-cv/cv.pdf | |
- name: Push github profile files | |
run: | | |
git clone https://x-access-token:${{ secrets.PAT }}@github.com/k4black/k4black.git remote/github-profile | |
cp -r build/github-profile/. remote/github-profile | |
cp -r build/latex-cv/cv.pdf remote/github-profile/chernyshev_cv.pdf | |
cd remote/github-profile | |
git add README.md chernyshev_cv.pdf | |
if ! git diff-index --quiet HEAD; then | |
git commit -m "Update from auto-profile repo" | |
git push --force | |
fi |