Update blank.yml #37
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
# This is a basic workflow to help you get started with Actions | |
name: CI | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the master branch | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-24.04 | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
- name: install ghostscript deps | |
run: sudo apt install -y libgs-dev | |
- name: install ghostscript | |
run: sudo wget http://http.us.debian.org/debian/pool/main/g/ghostscript/ghostscript_10.03.1~dfsg-1_amd64.deb -O ~/g.deb && sudo apt install -y ~/g.deb | |
- name: Install deps | |
run: sudo apt-get install -y texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra aptitude ghostscript | |
- name: render cv.pdf | |
run: pdflatex cv.tex | |
- name: render cv.png | |
run: gs -sDEVICE=png16m -dSAFER -dBATCH -dNOPAUSE -r600 -sOutputFile=cv.png cv.pdf | |
- name: Commit changes | |
uses: EndBug/add-and-commit@v7 | |
with: | |
branch: main | |
branch_mode: create | |
message: 'rendered new version [skip ci]' | |
add: '*.pdf *.png' | |
- name: Copy cv files to output | |
run: mkdir output && cp cv.png output/cv.png && cp cv.pdf output/cv.pdf | |
- name: Push to User Github Page | |
uses: cpina/github-action-push-to-another-repository@main | |
env: | |
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} | |
with: | |
source-directory: "output" | |
destination-github-username: "mklan" | |
destination-repository-name: "mklan.github.io" | |
user-email: "deploy@bot.org" | |
target-branch: main | |
target-directory: 'cv' | |