Trying another http-to-pdf action #26
This file contains 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: CI/CD | |
on: | |
push: | |
branches: ["main"] | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Serve Files | |
uses: Eun/http-server-action@v1 | |
with: | |
directory: ${{ github.workspace }} | |
port: 8080 | |
no-cache: true | |
index-files: | | |
["index.html", "index.htm"] | |
allowed-methods: | | |
["GET", "HEAD"] | |
content-types: | | |
{ | |
".html": "text/html", | |
".css": "text/css" | |
} | |
- name: HTML to PDF with Puppeteer and the real Google Chrome | |
uses: arthur-jaouen/html2pdf-action@v1 | |
with: | |
inputPath: "./index.html" | |
outputPath: "./Eric-F-Olsen-Resume.pdf" | |
pdfOptions: '{"format": "Letter", "printBackground": true, "preferCSSPageSize": true}' | |
- name: Deploy with SSH and rsync | |
uses: burnett01/rsync-deployments@7.0.1 | |
with: | |
switches: -vr --delete-after --exclude .git/ --exclude .github/ --exclude .gitmodules --exclude LICENSE --exclude README.md | |
remote_path: /var/www/ericolsen.us/resume | |
remote_host: ${{ secrets.HOMESERVER_URL }} | |
remote_user: ${{ secrets.HOMESERVER_DEPLOY_USER }} | |
remote_key: ${{ secrets.HOMESERVER_DEPLOY_KEY }} | |
remote_key_pass: ${{ secrets.HOMESERVER_DEPLOY_PASS }} |