Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
eliselavy authored Sep 25, 2024
1 parent 815e207 commit ea09b78
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/pandoc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
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: creating pull request
# run: gh pr create -B ${{ github.ref }} -H pandoc --title 'Comparison between nbconvert review of the article and the main article' --body 'Created by Github action'
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit ea09b78

Please sign in to comment.