Feat: update tech stack #100
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
# CICD to compile CV using Xelatex, store the PDF in output/, and send the PDF to S3 | |
name: Build LaTeX | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
CI_COMMIT_MESSAGE: CICD GitHub Actions build | |
CI_COMMIT_AUTHOR: Continuous Integration | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Configure AWS | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-east-1 | |
- name: Build | |
uses: xu-cheng/latex-action@v2 | |
with: | |
working_directory: ./src | |
root_file: pmoehrke.tex | |
- name: Deploy | |
if: github.event_name == 'push' | |
run: | | |
mv src/pmoehrke.pdf output/ | |
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}" | |
git config --global user.email "[email protected]" | |
git pull | |
git add . | |
git commit -m "${{ env.CI_COMMIT_MESSAGE }}" || echo "No modifications" | |
git push | |
aws s3 sync ./output s3://patrick-moehrke-cv-pdf |