Created
April 11, 2022 17:15
-
-
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
This file contains hidden or 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: 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