Skip to content

Instantly share code, notes, and snippets.

@TheGarkine
Created April 11, 2022 17:15
Show Gist options
  • Select an option

  • Save TheGarkine/c60777a06024f8e47f7d86543bd65987 to your computer and use it in GitHub Desktop.

Select an option

Save TheGarkine/c60777a06024f8e47f7d86543bd65987 to your computer and use it in GitHub Desktop.
A Short GitHub Actions workflow to build my CVs and push them to one Drive
name: Build CVs
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
File: [CV_Raphael_Krauthann, Lebenslauf_Raphael_Krauthann]
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra texlive-lang-german
- name: Install python dependencies
run: pip3 install --upgrade -r requirements.txt
- name: Store token.json
run: echo $GDRIVE_SERVICE_TOKEN >> token.json
env:
GDRIVE_SERVICE_TOKEN: ${{secrets.GDRIVE_SERVICE_TOKEN}}
- name: Build PDF
run: pdflatex $FILE.tex
working-directory: ./CV
env:
FILE: ${{matrix.File}}
- name: Upload PDF as artifact
uses: actions/upload-artifact@v3
with:
name: ${{matrix.File}}
path: CV/${{matrix.File}}.pdf
retention-days: 30
- name: Upload PDF to GDrive
run: python3 upload_to_gdrive_folder.py -n $FILE.pdf -f $FOLDER -l CV/$FILE.pdf
env:
FILE: ${{matrix.File}}
FOLDER: ${{secrets.GDRIVE_FOLDER}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment