Skip to content

Commit

Permalink
rename file / addition pandoc workflow / C2DH/jdh-notebook#185
Browse files Browse the repository at this point in the history
  • Loading branch information
eliselavy committed Oct 30, 2024
1 parent 240bdc6 commit cbd031b
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/github-actions-preflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
id: preflight
uses: c2dh/journal-of-digital-history-ipynb-preflight-action@master
with:
notebook: '3d_voyages-anonymous.ipynb'
notebook: 'article.ipynb'
functions: 'checkcitation,checkoutput,checkhtml,checkjavascript,checktags,checkurls'
output_md: 'report.md'
# Use the output from the `preflight` step
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/github-actions-publishing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
id: skim
uses: c2dh/[email protected]
with:
notebook: '3d_voyages-anonymous.ipynb'
notebook: 'article.ipynb'
output_notebook: 'skim-article.ipynb'
# Use the output from the `hello` step
- name: Use the output
Expand Down
84 changes: 84 additions & 0 deletions .github/workflows/pandoc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
on: [workflow_dispatch]

name: GitHub Actions for pandoc
jobs:
pandoc:
runs-on: ubuntu-latest
name: nbconvert
steps:
- name: checkout repo
uses: actions/checkout@v3

- name: deleting pandoc branch if exists
shell: bash
run: |
git push origin -d pandoc &>/dev/null || true
- name: extracting branch name & creating the new pandoc branch
shell: bash
run: |
echo "GitHub reft_name ${{ github.ref_name }}"
git checkout -b pandoc
git push -u origin pandoc
id: extract_branch
- name: retreiving name of the article
id: getfile
run: |
FIRST_FILE=$(ls *.ipynb | sort | head -n 1 | sed -e 's/\.ipynb$//')
echo "FIRST_IPYNB_FILE=$FIRST_FILE" >> $GITHUB_ENV
- name: pandoc convertion to docx
uses: docker://pandoc/latex:2.9
with:
args: --output=${{ env.FIRST_IPYNB_FILE }}.docx ${{ env.FIRST_IPYNB_FILE }}.ipynb

- name: committing changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Automated commit
branch: pandoc
create_branch: true
- name: Send mail
uses: dawidd6/action-send-mail@v3
with:
# Specify connection via URL (replaces server_address, server_port, secure,
# username and password)
#
# Format:
#
# * smtp://user:password@server:port
# * smtp+starttls://user:password@server:port
# connection_url: 'smtp://[email protected]:"soes wbsg snpk rqno"@smtp.gmail.com:465'
# Required mail server address if not connection_url:
server_address: smtp.gmail.com
# # Server port, default 25:
server_port: 465
# Optional whether this connection use TLS (default is true if server_port is 465)
# secure: true
# # Optional (recommended) mail server username:
username: [email protected]
# # Optional (recommended) mail server password:
password: soes wbsg snpk rqno
# Required mail subject:
subject: test email from github actions
# Required recipients' addresses:
to: [email protected]
# Required sender full name (address can be skipped):
from: Aboba Boba # <[email protected]>
# Optional plain body:
body: hello from github actions
# # Optional HTML body read from file:
# html_body: file://README.html
# Optional carbon copy recipients:
# cc: [email protected],[email protected]
# # Optional blind carbon copy recipients:
# bcc: [email protected],[email protected]
# Optional recipient of the email response:
reply_to: [email protected]
# Optional unsigned/invalid certificates allowance:
ignore_cert: true
# # Optional converting Markdown to HTML (set content_type to text/html too):
# convert_markdown: true
# # Optional attachments:
# attachments: attachments.zip,git.diff,./dist/static/*.js
# Optional priority: 'high', 'normal' (default) or 'low'
priority: normal
File renamed without changes.

0 comments on commit cbd031b

Please sign in to comment.