Skip to content

Commit f83c7dd

Browse files
committed
feat: GitHub actions build
1 parent b0686e5 commit f83c7dd

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

.github/workflows/generate-cv.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Generate CV PDF
2+
3+
on:
4+
push:
5+
branches:
6+
- '*'
7+
pull_request:
8+
branches:
9+
- '*'
10+
concurrency:
11+
# github.workflow: name of the workflow
12+
# github.event.pull_request.number || github.ref: pull request number or branch name if not a pull request
13+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
14+
15+
# Cancel in-progress runs when a new workflow with the same group name is triggered
16+
cancel-in-progress: true
17+
18+
jobs:
19+
generate-cv:
20+
name: Generate CV as PDF
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
# Checkout the repository containing the CV source files
25+
- name: Checkout code
26+
uses: actions/checkout@v3
27+
28+
# Install necessary dependencies for PDF generation
29+
- name: Set up dependencies
30+
run: |
31+
32+
sudo apt-get update
33+
sudo apt-get install -y fonts-roboto \
34+
texlive-xetex texlive texlive-latex-extra texlive-fonts-recommended texlive-fonts-extra
35+
curl -sLS https://get.arkade.dev | sudo sh
36+
arkade get --path /usr/local/bin just
37+
38+
# Generate the CV PDF (assuming a Markdown to LaTeX to PDF pipeline using Pandoc)
39+
- name: Generate PDF from CV source
40+
run: |
41+
just build
42+
43+
- name: Upload CV as an artifact
44+
if: env.ACT != 'true'
45+
uses: actions/upload-artifact@v3
46+
with:
47+
path: output/cv.pdf
48+
49+
# - name: Upload CV PDF to release
50+
# if: startsWith(github.ref, 'refs/tags/') && env.ACT != 'true'
51+
## if: env.ACT != 'true'
52+
# uses: actions/upload-release-asset@v1
53+
# env:
54+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55+
# with:
56+
# upload_url: ${{ github.event.release.upload_url }}
57+
# asset_path: output/cv.pdf
58+
# asset_name: cv.pdf
59+
# asset_content_type: application/pdf

0 commit comments

Comments
 (0)