Skip to content

Commit

Permalink
Merge pull request #16 from doctor500/refactor/pdf_filename
Browse files Browse the repository at this point in the history
refactor: remove harcoded filename
  • Loading branch information
doctor500 committed Jun 2, 2023
2 parents e7269e6 + cdb1e4f commit b253827
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/publish-pdf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,20 @@ jobs:
uses: fifsky/html-to-pdf-action@v0.1.0
with:
htmlFile: ./_site/index.html
outputFile: "./CV-David_Layardi-${{ env.PIPELINE_DATE }}.pdf"
outputFile: "./CV-${{ env.PIPELINE_DATE }}.pdf"
pdfOptions: '{"format": "A4", "margin": {"top": "10mm", "left": "10mm", "right": "10mm", "bottom": "10mm"}}'
- name: Publish PDF result to artifact
if: ${{ github.event.inputs.build_private == 'true' }}
uses: actions/upload-artifact@v3
with:
name: "CV-David_Layardi-${{ env.PIPELINE_DATE }}.pdf"
path: "./CV-David_Layardi-${{ env.PIPELINE_DATE }}.pdf"
name: "CV-${{ env.PIPELINE_DATE }}.pdf"
path: "./CV-${{ env.PIPELINE_DATE }}.pdf"
retention-days: 2
- name: Publish PDF to GitHub release
if: ${{ github.event.inputs.build_private == 'false' }}
uses: softprops/action-gh-release@v1
with:
files: "CV-David_Layardi-${{ env.PIPELINE_DATE }}.pdf"
files: "CV-${{ env.PIPELINE_DATE }}.pdf"
fail_on_unmatched_files: true
name: "🚀 PDF Publish R.${{ env.PIPELINE_DATE }}"
tag_name: "PDF_${{ env.PIPELINE_DATE }}-${{ env.PIPELINE_TIMESTAMP }}"
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ graph TD;
```
To enable generate PDF feature, you can enable the GitHub action integration after you fork this repo.

### Sub-feature, build pipeline with sensitive data
This pipeline also has options to generate PDFs privately in case you want to include sensitive data (for example phone number). I create an example to add a phone number inside the markdown before the build process. I store the phone number data on GitHub repo secrets, and this PDF will not create a new release into the repo. It also will **expired 48h** after it generated on pipeline artifacts
### Sub-feature, build pdf with phone number data
This pipeline also has options to generate PDFs privately in case you want to include sensitive data (phone number). The generated PDF will not create a new release into the repo, and also the PDF will **expired 48h** after it generated on pipeline artifacts.

You can use this feature by tick the check box `Build privately & include sensitive data`. To fill the phone number:
You can use this feature by tick the check box `Build privately & include sensitive data`. To fill the phone number:
1. Open repo **Settings** > **Secrets and variables** > Actions
2. Going to `Secrets` tab and click **New repository secret**.
3. Fill Name with `CV_PHONE_NUMBER`, and Secret with your phone number (ex: `+62 123123123`)
Expand Down

0 comments on commit b253827

Please sign in to comment.