AustinTSchaffer - PDF Uploaded #13
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: send-pdfs-to-kindle | |
run-name: ${{ github.actor }} - PDF Uploaded | |
on: | |
push: | |
paths: | |
- OMSCS/Courses/** | |
jobs: | |
send-to-kindle: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: PDF filter. | |
id: filter | |
uses: dorny/paths-filter@v2 | |
with: | |
filters: | | |
newpdfs: | |
- added|modified: '**/*.pdf' | |
list-files: 'csv' | |
- name: Send mail | |
if: steps.filter.outputs.newpdfs == 'true' | |
uses: dawidd6/action-send-mail@v3 | |
with: | |
server_address: ${{secrets.SMTP_ADDRESS}} | |
secure: true | |
server_port: ${{secrets.SMTP_SERVER_PORT}} | |
username: ${{secrets.MAIL_USERNAME}} | |
password: ${{secrets.MAIL_PASSWORD}} | |
# Required mail subject: | |
subject: Github Actions job result | |
# Required recipients' addresses: | |
to: ${{secrets.KINDLE_EMAIL_ADDRESS}} | |
# Required sender full name (address can be skipped): | |
from: Austin's PDF Sending GitHub Action | |
# Optional plain body: | |
body: A new PDF has been uploaded to your notebook repository. | |
# Optional carbon copy recipients: | |
cc: [email protected] | |
# Optional recipient of the email response: | |
reply_to: [email protected] | |
# Optional unsigned/invalid certificates allowance: | |
ignore_cert: true | |
# Optional attachments: | |
attachments: ${{ steps.filter.outputs.newpdfs_files }} |