Skip to content

Commit ff9d692

Browse files
committed
fix: render on any branch, publish only on master
1 parent 1c68395 commit ff9d692

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

.github/workflows/render-cv.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Render CV + Deploy ONLY index.html + README.md
1+
name: Render CV + Deploy (master only)
22

33
on:
44
push:
@@ -20,13 +20,21 @@ jobs:
2020

2121
- run: nix develop --command rendercv render cv.yaml --output-folder render-output -nopng
2222

23-
- name: Prepare clean deployment (ONLY index.html + README.md)
23+
- name: Commit rendered files to current branch
24+
uses: stefanzweifel/git-auto-commit-action@v5
25+
with:
26+
commit_message: "chore: update rendered CV (PDF/HTML/MD) for this branch"
27+
file_pattern: render-output/*
28+
29+
- name: Deploy to personal page & profile README (master only)
30+
if: github.ref == 'refs/heads/master'
2431
run: |
2532
mkdir -p deploy
2633
cp render-output/Yury_Zakharov_CV.html deploy/index.html
2734
cp render-output/Yury_Zakharov_CV.md deploy/README.md
2835
29-
- name: Deploy to Yury-Zakharov repo (personal page + profile README)
36+
- name: Deploy index.html + README.md
37+
if: github.ref == 'refs/heads/master'
3038
uses: peaceiris/actions-gh-pages@v4
3139
with:
3240
personal_token: ${{ secrets.GH_PAT }}

0 commit comments

Comments
 (0)