Skip to content

Update database.py #132

Update database.py

Update database.py #132

Workflow file for this run

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@v3
- name: Cache Conda environment
uses: actions/cache@v2
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@v2
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@v3
with:
name: artifacts
path: pdfs/
# release:
# needs: [build]
# runs-on: ubuntu-latest
# steps:
#
# - name: Checkout
# uses: actions/checkout@v2
#
# - name: Download artifacts
# uses: actions/download-artifact@v3
# with:
# path: pdfs
# - name: Create Release
# id: create_release
# uses: softprops/action-gh-release@v1
# with:
# files: |
# pdfs/artifacts/CV.pdf
# pdfs/artifacts/CVshort.pdf
# pdfs/artifacts/publist.pdf
# pdfs/artifacts/talklist.pdf
# token: ${{ secrets.GITHUB_TOKEN }}
# name: $(date +'%Y_%m_%d_%H_%M_%S')
# tag_name: $(date +'%Y_%m_%d_%H_%M_%S')
deploy:
# Edit here if compiling multiple papers
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download artifacts
uses: actions/download-artifact@v3
with:
path: pdfs
- name: move
run: mkdir -p github_deploy && mv pdfs/*/* github_deploy
- name: deploy on orphan branch
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./github_deploy
publish_branch: build
force_orphan: true