resume/.forgejo/workflows/build.yml
Jean-Michel Tremblay a05368480f
Some checks failed
Build Resume / build (push) Failing after 2s
rename properly
2026-04-19 21:36:58 -04:00

29 lines
No EOL
1.2 KiB
YAML

name: Build Resume
on: [push]
jobs:
build:
runs-on: docker
steps:
- name: Checkout
run: git clone ${{ github.server_url }}/${{ github.repository }}.git .
- name: Build
run: docker run --rm -w /doc -v $PWD:/doc thomasweise/docker-texlive-full make
- name: Rename PDFs
run: |
TIMESTAMP=$(date +%Y_%m_%d_%H:%M:%S)
BUILT=$(ls examples/resume_jm_tremblay*.pdf)
cp "$BUILT" "examples/resume_jm_tremblay_${TIMESTAMP}.pdf"
cp "$BUILT" examples/resume_jm_tremblay_latest.pdf
- name: Upload PDF
uses: actions/upload-artifact@v3
with:
name: resume
path: examples/resume_jm_tremblay*.pdf
- name: Deploy
run: |
echo "${{ secrets.FORGEJO_SSH }}" > /tmp/deploy_key
chmod 600 /tmp/deploy_key
ssh -i /tmp/deploy_key -o StrictHostKeyChecking=no jmopines@192.168.64.102 "mkdir -p ~/resume"
scp -i /tmp/deploy_key -o StrictHostKeyChecking=no examples/resume_jm_tremblay_*_*.pdf jmopines@192.168.64.102:~/resume/
scp -i /tmp/deploy_key -o StrictHostKeyChecking=no examples/resume_jm_tremblay_latest.pdf jmopines@192.168.64.102:~/resume/
rm /tmp/deploy_key