Add GitHub Actions workflow for resume PDF generation #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Generate Resume PDF | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-resume: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v6.2.0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6.2.0 | |
| with: | |
| node-version: '20' | |
| - name: Install & Run md-to-pdf | |
| run: | | |
| npx md-to-pdf README.md --document-title 'CV Marco Augustin' --stylesheet style.css --launch-options '{"args": ["--no-sandbox", "--disable-setuid-sandbox"]}' --pdf-options '{"format": "A4", "margin": {"top": "20mm", "right": "20mm", "bottom": "20mm", "left": "20mm"}, "printBackground": true, "preferCSSPageSize": true}' | |
| mv README.pdf cv-marco-augustin.pdf | |
| - name: Upload PDF as Artifact | |
| uses: actions/upload-artifact@v6.0.0 | |
| with: | |
| name: Marco_Augustin_CV | |
| path: cv-marco-augustin.pdf | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| if: github.ref == 'refs/heads/main' | |
| with: | |
| tag_name: latest | |
| files: cv-marco-augustin.pdf | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |