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
name: LaTeX Build | |
on: | |
push: | |
branches: | |
- master # Change this to match the branch you want to trigger the build on | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Git repository | |
uses: actions/checkout@v2 | |
- name: lualatex main en | |
uses: dante-ev/latex-action@latest | |
with: | |
root_file: CV_Javier_EN.tex | |
compiler: lualatex | |
args: -interaction=nonstopmode -shell-escape | |
- name: lualatex main es | |
uses: dante-ev/latex-action@latest | |
with: | |
root_file: CV_Javier_ES.tex | |
compiler: lualatex | |
args: -interaction=nonstopmode -shell-escape | |
- uses: dev-drprasad/[email protected] # PRERELEASE is v1.0 and can also be used to test and give us feedback | |
with: | |
tag_name: CV #(required) tag name to delete | |
github_token: ${{ secrets.GITHUB_TOKEN }} # (required) a GitHub token with write access to the repo that needs to be modified | |
delete_release: true #(optional) default: true | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: CV | |
release_name: Release CV | |
draft: false | |
prerelease: false | |
- name: Upload Release Asset | |
id: upload-release-asset-en | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./CV_Javier_EN.pdf | |
asset_name: CV_Javier_EN.pdf | |
asset_content_type: pdf | |
- name: Upload Release Asset ES | |
id: upload-release-asset-es | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./CV_Javier_ES.pdf | |
asset_name: CV_Javier_ES.pdf | |
asset_content_type: application/pdf | |
# Sets up a Python environment | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.11' # Choose the Python version you need | |
# Install dependencies | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
# Run Python script | |
- name: Run script | |
run: python remove_images.py | |
- name: Upload Release Asset EN (no images) | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./CV_Javier_EN_lite.pdf | |
asset_name: CV_Javier_EN_lite.pdf | |
asset_content_type: application/pdf | |
- name: Upload Release Asset ES (no images) | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./CV_Javier_ES_lite.pdf | |
asset_name: CV_Javier_ES_lite.pdf | |
asset_content_type: application/pdf | |