Skip to content

Commit 5d0d1cc

Browse files
committed
Refactor PDF artifact upload process to include unique suffixes for each PDF; update README to reflect changes in artifact naming.
1 parent 8c3bd02 commit 5d0d1cc

File tree

2 files changed

+34
-4
lines changed

2 files changed

+34
-4
lines changed

.github/workflows/build-pdf-artifacts.yml

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,40 @@ jobs:
3636
NODE_ENV: production
3737
HIDE_ONLINE_CV_LINK: 'true'
3838

39-
- name: Upload PDF artifacts
39+
- name: Compute artifact suffix
40+
id: artifact_meta
41+
run: |
42+
SAFE_REF_NAME="${GITHUB_REF_NAME//\//-}"
43+
echo "artifact_suffix=${SAFE_REF_NAME}-${GITHUB_RUN_NUMBER}" >> "$GITHUB_OUTPUT"
44+
45+
- name: Upload artifact cv-fr-dark.pdf
46+
uses: actions/upload-artifact@v4
47+
with:
48+
name: cv-fr-dark-${{ steps.artifact_meta.outputs.artifact_suffix }}
49+
path: dist/pdf/cv-fr-dark.pdf
50+
if-no-files-found: error
51+
retention-days: 30
52+
53+
- name: Upload artifact cv-fr-light.pdf
54+
uses: actions/upload-artifact@v4
55+
with:
56+
name: cv-fr-light-${{ steps.artifact_meta.outputs.artifact_suffix }}
57+
path: dist/pdf/cv-fr-light.pdf
58+
if-no-files-found: error
59+
retention-days: 30
60+
61+
- name: Upload artifact cv-en-dark.pdf
62+
uses: actions/upload-artifact@v4
63+
with:
64+
name: cv-en-dark-${{ steps.artifact_meta.outputs.artifact_suffix }}
65+
path: dist/pdf/cv-en-dark.pdf
66+
if-no-files-found: error
67+
retention-days: 30
68+
69+
- name: Upload artifact cv-en-light.pdf
4070
uses: actions/upload-artifact@v4
4171
with:
42-
name: pdf-${{ github.ref_name }}-${{ github.run_number }}
43-
path: dist/pdf/
72+
name: cv-en-light-${{ steps.artifact_meta.outputs.artifact_suffix }}
73+
path: dist/pdf/cv-en-light.pdf
4474
if-no-files-found: error
4575
retention-days: 30

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Un second workflow ([`.github/workflows/build-pdf-artifacts.yml`](.github/workfl
117117
- Sauf branches techniques: `dependabot/**` et `renovate/**`
118118
2. Build les PDFs (`npm run build:pdf`)
119119
- Avec suppression du lien **CV en ligne** dans le PDF (flag `HIDE_ONLINE_CV_LINK=true`)
120-
3. Publie `dist/pdf/` en **artefacts téléchargeables** dans GitHub Actions
120+
3. Publie **un artefact par PDF** (ex: `cv-fr-dark`, `cv-en-light`) dans GitHub Actions
121121

122122
### URLs déployées
123123

0 commit comments

Comments
 (0)