mirror of
https://github.com/kemko/resume.git
synced 2026-01-01 15:55:47 +03:00
feat: github action to generate and save PDF
This commit is contained in:
39
.github/workflows/generate-pdf.yml
vendored
39
.github/workflows/generate-pdf.yml
vendored
@@ -1,18 +1,33 @@
|
||||
name: Generate PDF from resume
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- "resume.md"
|
||||
|
||||
jobs:
|
||||
generate_pdf:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Use Node.js 20
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
|
||||
- name: pnpm install and build
|
||||
run: |
|
||||
pnpm install
|
||||
pnpm run build --if-present
|
||||
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "20" # Specify the Node.js version
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install -g pnpm && pnpm install # Install dependencies
|
||||
|
||||
- name: Generate PDF
|
||||
run: pnpm build # Ensure this script generates the PDF from resume.md
|
||||
|
||||
- name: Commit PDF
|
||||
run: |
|
||||
git config --local user.email "action@github.com"
|
||||
git config --local user.name "GitHub Action"
|
||||
git add output/resume.pdf
|
||||
git commit -m "Update resume PDF" -a || echo "No changes to commit"
|
||||
git push
|
||||
|
||||
Reference in New Issue
Block a user