Skip to content

Update build.yml

Update build.yml #7

Workflow file for this run

name: Build LaTeX Document and Move PDF
on:
push:
branches:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
# - name: Github Actions for build LaTeX and release pdf
# # You may pin to the exact commit or the version.
# # uses: MaineK00n/latex-actions@dcfee591c3d649889ee769f6fbee81525ac48bd3
# uses: MaineK00n/[email protected]
# with:
# # github root_tex. this is require when comment is true.
# root: mai-joel_maximilian-curriculum_vitae.tex
# # github token. this is require when comment is true.
# token: ${{ secrets.GITHUB_TOKEN }}
# # github repository name. this is require when comment is true.
# repository: mai-space/curriculum_vitae
# # release pdf name. this is require when comment is true.
# pdf_name: mai-joel_maximilian-curriculum_vitae
- name: Compile LateX
# You may pin to the exact commit or the version.
# uses: vinay0410/tectonic-action@b3138021657a3cdb3823f3980be054ca89e86d81
uses: antaljanosbenjamin/[email protected]
with:
file: mai-joel_maximilian-curriculum_vitae.tex
output-directory: downloads/
args: -pdf
- name: Test if pdf build was successful
run: '(test -f downloads/mai-joel_maximilian-curriculum_vitae.pdf && echo PDF exists) || (echo PDF does not exist && exit 1)'
- name: Get current commit hash
id: commit_hash
run: echo "::set-output name=hash::$(git rev-parse HEAD)"
- name: Generate tag name
id: generate_tag
run: echo "::set-output name=tag::v$GITHUB_SHA"
- name: Create Release
id: create_release
uses: actions/[email protected]
with:
files: |
downloads/mai-joel_maximilian-curriculum_vitae.pdf
tag_name: ${{ steps.generate_tag.outputs.tag }}
release_name: Release ${{ steps.generate_tag.outputs.tag }}
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Upload Release Asset
# id: upload_release_asset
# uses: actions/upload-release-asset@v1
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: downloads/mai-joel_maximilian-curriculum_vitae.pdf
# asset_name: mai-joel_maximilian-curriculum_vitae.pdf
# asset_content_type: application/pdf
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}