如何通过Github Action在Github中运行ipynb文件

时间:2020-04-07 23:41:09

标签: github jupyter-notebook github-actions

我想在github存储库中定期运行ipynb文件(就像每30分钟运行一次)。

我知道我可以使用Github Action来创建yml文件,但是我不知道如何重组yml文件。

我该怎么办?

这是下面定义的我的测试tml文件。

# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
  schedule:
    - cron: '*/5 * * * *'
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
  # This workflow contains a single job called "build"
  build:
    # The type of runner that the job will run on
    runs-on: ubuntu-latest

    # Steps represent a sequence of tasks that will be executed as part of the job
    steps:
    # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
    - uses: actions/checkout@v2

    # Runs a single command using the runners shell
    - name: Run a one-line script
      run: echo Hello, world!

    # Runs a set of commands using the runners shell
    - name: Run a multi-line script
      run: |
        echo Add other actions to build,
        echo test, and deploy your project.

1 个答案:

答案 0 :(得分:1)

您可以签出运行您的jupyter笔记本并允许您上传工件的GitHub action。关于如何组织工作流程文件,您可以阅读documentation here