Bump up github actions versions #46
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: Build documents | |
on: | |
push: | |
branches: | |
master | |
jobs: | |
build_cv: | |
name: Build CV | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3.5.3 | |
- name: Build pdf | |
id: build_pdf | |
uses: tcibinan/build-latex-already@0.1.8 | |
with: | |
tex: cv.tex | |
name: cv | |
- name: Build png | |
id: build_png | |
run: sudo apt-get install poppler-utils && | |
pdftoppm ${{ steps.build_pdf.outputs.pdf }} cv -png -singlefile && | |
echo "::set-output name=png::cv.png" | |
- name: Retrieve date | |
id: resolve_date | |
run: echo ::set-output name=date::$(date +'%d.%m.%Y') | |
- name: Tag latest commit | |
uses: richardsimko/update-tag@v1.0.7 | |
with: | |
tag_name: ${{ steps.resolve_date.outputs.date }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Get latest release | |
id: get_latest_release | |
uses: pozetroninc/github-action-get-latest-release@v0.7.0 | |
with: | |
repository: tcibinan/CV | |
- name: Create or update release | |
uses: meeDamian/github-release@v2.0.3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ steps.resolve_date.outputs.date }} | |
name: ${{ steps.resolve_date.outputs.date }} | |
files: > | |
${{ steps.build_pdf.outputs.pdf }} | |
${{ steps.build_png.outputs.png }} | |
allow_override: true | |
gzip: false | |
- name: Collect assets | |
id: collect_assets | |
run: mkdir assets && | |
cp ${{ steps.build_pdf.outputs.pdf }} | |
${{ steps.build_png.outputs.png }} | |
assets && | |
echo "::set-output name=assets::assets" | |
- name: Deploy to pages | |
uses: crazy-max/ghaction-github-pages@v3.1.0 | |
with: | |
target_branch: gh-pages | |
build_dir: ${{ steps.collect_assets.outputs.assets }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |