push-bib #223
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
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
# This workflow will download a prebuilt Ruby version, install dependencies and build the site with Rake. | |
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby | |
name: LaTeX | |
on: | |
repository_dispatch: | |
push: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.9] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
persist-credentials: false | |
submodules: true | |
fetch-depth: 0 | |
- name: Update bibliography | |
run: | | |
cd bibliography | |
git branch -u origin/main main | |
cd .. | |
git submodule update --remote --recursive | |
- name: Set up Conda Environment | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
activate-environment: cv | |
environment-file: environment.yml | |
python-version: ${{ matrix.python-verison }} | |
- name: Generate Template | |
run: python generate_cv.py | |
- name: Build CV | |
uses: xu-cheng/latex-action@v2 | |
with: | |
root_file: Srikrishnan-CV.tex | |
args: "-bibtex-cond1 -pdfxe" | |
post_compile: "latexmk -c" | |
- name: Commit | |
run: | | |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git add Srikrishnan-CV.pdf | |
git add bibliography/ | |
git commit -m "update CV" | |
- name: Push | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} | |
force: True | |
- name: Copy CV File | |
uses: dmnemec/[email protected] | |
env: | |
API_TOKEN_GITHUB: ${{ secrets.PUSH_TOKEN }} | |
with: | |
source_file: 'Srikrishnan-CV.pdf' | |
destination_repo: 'vsrikrish/vsrikrish.github.io' | |
destination_folder: 'assets/pdf' | |
user_email: '[email protected]' | |
user_name: 'vsrikrish' | |
destination_branch: 'master' |