GitHub Actions for nbconvert #4
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
on: [workflow_dispatch] | |
name: GitHub Actions for nbconvert | |
jobs: | |
nbconvert: | |
runs-on: ubuntu-latest | |
name: nbconvert | |
steps: | |
- name: checkout repo | |
uses: actions/checkout@v3 | |
# - name: Extract branch name & create the nbconvert branch | |
# shell: bash | |
# run: | | |
# echo "GitHub reft_name ${{ github.ref_name }}" | |
# git checkout -b nbconvertt | |
# git push -u origin nbconvertt | |
# id: extract_branch | |
- name: nbconvert run | |
run: | | |
pip install -r requirements.txt | |
python -m pip install jupyter nbconvert nbformat | |
python -m spacy download en_core_web_lg | |
jupyter nbconvert --execute --to notebook --inplace --ExecutePreprocessor.timeout=-1 checkmd.ipynb | |
# Use the output from the `preflight` step | |
- name: Use the output | |
run: echo "Notebook path ${{ steps.preflight.outputs.notebook_path }} - workspace ${{ steps.preflight.outputs.workspace }}" | |
- name: commit changes | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: Automated commit | |
branch: nbconvertt | |
create_branch: true | |
file_pattern: '*.ipynb' | |
- name: Create Pull Request | |
id: cpr | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: Update report | |
committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | |
author: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com> | |
signoff: false | |
branch: nbconvertt | |
delete-branch: true | |
title: '[Example] Update report' | |
body: | | |
Update report | |
- Updated with *today's* date | |
- Auto-generated by [create-pull-request][1] | |
labels: | | |
report | |
automated pr | |
assignees: memerchik | |
reviewers: memerchik | |
draft: false | |