Skip to content

Commit ca133de

Browse files
committed
Revert "chore(cicd): update workflow"
This reverts commit f6b1caa.
1 parent 0dae8e4 commit ca133de

File tree

1 file changed

+30
-49
lines changed

1 file changed

+30
-49
lines changed

.github/workflows/tex-to-pdf.yml

Lines changed: 30 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
1-
name: TeX to PDF
1+
name: Tex to PDF
22
run-name: ${{ github.workflow }}
33

44
on:
55
push:
6-
branches: [main]
7-
paths:
8-
- "**/*.tex"
9-
- ".github/workflows/tex-to-pdf.yml"
10-
11-
concurrency:
12-
group: resume-${{ github.ref }}
13-
cancel-in-progress: true
6+
branches:
7+
- main
148

159
jobs:
1610
build:
@@ -21,58 +15,45 @@ jobs:
2115
steps:
2216
- name: Checkout repository
2317
uses: actions/checkout@v4
24-
with:
25-
persist-credentials: false
26-
fetch-depth: 0
27-
28-
# Faster & reliable: latexmk + cached TeX Live
29-
- name: Set up LaTeX (TeX Live + cache)
30-
uses: teatimeguest/setup-texlive-action@v3
31-
with:
32-
packages: >-
33-
latexmk
34-
texlive-latex-recommended
35-
texlive-latex-extra
36-
texlive-fonts-recommended
37-
# add any specific packages you use, e.g. fontspec, xcolor, etc.
3818

39-
- name: Build PDF
19+
- name: Install TeXLive
4020
run: |
41-
set -euo pipefail
42-
latexmk -pdf -interaction=nonstopmode -halt-on-error -file-line-error -jobname=Onur_Ravli_Resume resume.tex
43-
ls -lh Onur_Ravli_Resume.pdf
21+
sudo apt-get update
22+
sudo apt-get install -y texlive-latex-extra texlive-fonts-recommended
4423
45-
- name: Upload PDF artifact
46-
uses: actions/upload-artifact@v4
47-
with:
48-
name: Onur_Ravli_Resume
49-
path: Onur_Ravli_Resume.pdf
50-
if-no-files-found: error
51-
retention-days: 7
24+
- name: Compile LaTeX to PDF
25+
run: |
26+
pdflatex -jobname=Onur_Ravli_Resume resume.tex
5227
53-
- name: Commit and push PDF to this repo
28+
- name: Commit and push PDF
5429
env:
5530
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5631
run: |
5732
git config --local user.email "${{ github.actor }}@users.noreply.github.com"
58-
git config --local user.name "${{ github.actor }}"
33+
git config --local user.name "${{ github.actor }}"
5934
git add Onur_Ravli_Resume.pdf
60-
git commit -m "docs: update resume" || exit 0
61-
git push https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git HEAD:${{ github.ref }}
35+
git commit -m "docs: update resume" || echo "No changes to commit"
36+
git push https://${{ github.actor }}:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git HEAD:${{ github.ref }}
6237
63-
- name: Push PDF to onurravli-com
64-
if: success()
38+
- name: Push PDFs to onurravli-com repository
6539
env:
66-
PAT_TOKEN: ${{ secrets.PAT_TOKEN }} # fine-grained PAT with contents:write on onurravli-com
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}
6742
run: |
68-
set -euo pipefail
69-
git clone --depth=1 https://x-access-token:${PAT_TOKEN}@github.com/onurravli/onurravli-com.git website
70-
cd website
43+
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
44+
git config --global user.name "${{ github.actor }}"
45+
46+
# Clone the target repository using PAT
47+
git clone https://${{ github.actor }}:${PAT_TOKEN}@github.com/onurravli/onurravli-com.git
48+
cd onurravli-com
49+
50+
# Create public folder if it doesn't exist
7151
mkdir -p public
52+
53+
# Copy PDFs to public folder
7254
cp ../Onur_Ravli_Resume.pdf public/Onur_Ravli_Resume.pdf
73-
git config --local user.email "${{ github.actor }}@users.noreply.github.com"
74-
git config --local user.name "${{ github.actor }}"
55+
56+
# Commit and push to target repository
7557
git add public/Onur_Ravli_Resume.pdf
76-
git commit -m "docs: update resume from automated build" || exit 0
77-
# adjust branch if website repo uses 'main'
78-
git push origin HEAD:main
58+
git commit -m "docs: update resume from automated build" || echo "No changes to commit"
59+
git push https://${{ github.actor }}:${PAT_TOKEN}@github.com/onurravli/onurravli-com.git master

0 commit comments

Comments
 (0)