Update CV.tex #144
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: CV workflow | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- '**/README.md' | |
pull_request: | |
branches: | |
- main | |
paths-ignore: | |
- '**/README.md' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Cache Conda environment | |
uses: actions/cache@v4 | |
with: | |
path: | | |
${{ env.HOME }}/.conda/pkgs/ | |
${{ env.HOME }}/.conda/envs/ | |
key: conda-${{ runner.os }}-${{ hashFiles('**/environment.yml') }} | |
restore-keys: | | |
conda-${{ runner.os }}- | |
- name: Set up conda | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
activate-environment: buildcv | |
environment-file: environment.yml | |
auto-update-conda: true | |
# - name: Conda environment | |
# run: conda env create --name buildcv --file environment.yml | |
- name: Run Python script | |
run: conda run --name buildcv bash -c "python makeCV.py --connected --token ${{ secrets.ADS_TOKEN }}" | |
- name: Run Python script for short CV | |
run: conda run --name buildcv bash -c "python makeCV.py --short" | |
- name: LaTeX CV | |
uses: dante-ev/latex-action@latest | |
with: | |
root_file: CV.tex | |
compiler: pdflatex | |
args: -interaction=nonstopmode -shell-escape | |
- name: LaTeX publist | |
uses: dante-ev/latex-action@latest | |
with: | |
root_file: publist.tex | |
compiler: pdflatex | |
args: -interaction=nonstopmode -shell-escape | |
- name: LaTeX talklist | |
uses: dante-ev/latex-action@latest | |
with: | |
root_file: talklist.tex | |
compiler: pdflatex | |
args: -interaction=nonstopmode -shell-escape | |
- name: LaTeX talklist | |
uses: dante-ev/latex-action@latest | |
with: | |
root_file: CVshort.tex | |
compiler: pdflatex | |
args: -interaction=nonstopmode -shell-escape | |
- name: Prepare | |
run: | | |
mkdir pdfs/ | |
mkdir texs/ | |
mv CV.pdf publist.pdf talklist.pdf CVshort.pdf pdfs/ | |
mv preamble.tex CV.tex metricspapers.tex parsepapers.tex parsetalks.tex publist.tex talklist.tex CVshort.tex pdfs/ | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: artifacts | |
path: pdfs/ | |
deploy: | |
# Edit here if compiling multiple papers | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: pdfs | |
- name: move | |
run: mkdir -p github_deploy && mv pdfs/*/* github_deploy | |
- name: deploy on orphan branch | |
uses: peaceiris/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./github_deploy | |
publish_branch: build | |
force_orphan: true | |